Skip to content

refactor!: replace enums with types#2208

Merged
tatomyr merged 6 commits intomainfrom
chore/remove-enums
Jul 24, 2025
Merged

refactor!: replace enums with types#2208
tatomyr merged 6 commits intomainfrom
chore/remove-enums

Conversation

@tatomyr
Copy link
Collaborator

@tatomyr tatomyr commented Jul 22, 2025

What/Why/How?

Addressing FIXMES before 2.0 GA:

  • Replaced SpecVersion, SpecMajorVersion, OPENAPI3_METHOD, and OPENAPI3_COMPONENT enums with types
  • Removed OasVersion enum

Reference

Testing

Screenshots (optional)

Check yourself

  • Code changed? - Tested with Redoc/Realm/Reunite (internal)
  • All new/updated code is covered by tests
  • New package installed? - Tested in different environments (browser/node)

Security

  • The security impact of the change has been considered
  • Code follows company security practices and guidelines

@changeset-bot
Copy link

changeset-bot bot commented Jul 22, 2025

🦋 Changeset detected

Latest commit: 8c18c80

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@redocly/openapi-core Major
@redocly/cli Major
@redocly/respect-core Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Jul 22, 2025

Command Mean [ms] Min [ms] Max [ms] Relative
redocly lint packages/core/src/benchmark/benches/rebilly.yaml 940.7 ± 12.1 922.2 954.9 1.00
redocly-next lint packages/core/src/benchmark/benches/rebilly.yaml 1457.5 ± 27.1 1423.2 1495.8 1.55 ± 0.04

@tatomyr tatomyr changed the title chore!: replace enums with types refactor!: replace enums with types Jul 22, 2025
@tatomyr tatomyr changed the title refactor!: replace enums with types chore!: replace enums with types Jul 22, 2025
@tatomyr tatomyr changed the title chore!: replace enums with types refactor!: replace enums with types Jul 22, 2025
@tatomyr tatomyr marked this pull request as ready for review July 22, 2025 21:11
@tatomyr tatomyr requested review from a team as code owners July 22, 2025 21:11
} else if (version === 'async3') {
components = root.components = root.components || {};
} else if (version === SpecMajorVersion.Arazzo1) {
} else if (version === 'arazzo1') {
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please explain why do you want to avoid using some const here is all those places?

@tatomyr tatomyr force-pushed the chore/remove-enums branch from 3fdedf7 to 1ca556f Compare July 24, 2025 06:53
@tatomyr tatomyr merged commit b097294 into main Jul 24, 2025
35 of 36 checks passed
@tatomyr tatomyr deleted the chore/remove-enums branch July 24, 2025 07:24
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