Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(common): add new enums to common/enums #13933

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Adi3g
Copy link

@Adi3g Adi3g commented Sep 1, 2024

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior?

Lack of standardized enums for common constants such as HTTP headers, protocols, MIME types, and other frequently used values. This leads to inconsistent usage and potential errors due to typos or mismatches.

Issue Number: N/A

What is the new behavior?

This PR introduces new enums in the common/enums directory to centralize and standardize common constants across the application. The new enums include:

  • CACHE_CONTROL: Common cache control directives.
  • CORS_SETTING: Common CORS settings headers.
  • HTTP_HEADERS: A list of HTTP headers.
  • MIME_TYPE: Common MIME types for content-type headers.
  • PROTOCOL: List of network protocols.
  • TIME_UNIT: Time units for various time-related operations.

These enums improve code maintainability and readability by reducing hard-coded values and standardizing their use across the codebase.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@coveralls
Copy link

Pull Request Test Coverage Report for Build 2c61aeb5-6394-48cb-b33e-e3beaf84e8b1

Details

  • 89 of 89 (100.0%) changed or added relevant lines in 7 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.09%) to 92.307%

Totals Coverage Status
Change from base Build 0b2170fc-d850-443a-8e46-397cb7d6d6fd: 0.09%
Covered Lines: 6839
Relevant Lines: 7409

💛 - Coveralls

Copy link

@benjGam benjGam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice changes, i hope this will be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants