Skip to content

Conversation

@jeremyfiel
Copy link
Contributor

@jeremyfiel jeremyfiel commented Feb 10, 2025

What/Why/How?

Added support for linting, preprocessors, decorators, and type extensions for Overlay v1 documents.

Reference

depends on #1775

Testing

Screenshots (optional)

Check yourself

  • Code changed? - Tested with redoc/reference-docs/workflows (internal)
  • All new/updated code is covered with tests
  • New package installed? - Tested in different environments (browser/node)

Security

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

@jeremyfiel jeremyfiel requested review from a team as code owners February 10, 2025 00:44
@changeset-bot
Copy link

changeset-bot bot commented Feb 10, 2025

🦋 Changeset detected

Latest commit: 7abbfe2

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 Minor
@redocly/cli Minor
@redocly/respect-core Patch

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

jeremyfiel added a commit to jeremyfiel/redocly-cli that referenced this pull request Feb 10, 2025
* updated references to use defined NodeTypes.
* update `any` to `unknown`
* run prettier
* rebase latest changes from main
* refactor to match Redocly#1898 type definitions

related Redocly#1246
@jeremyfiel jeremyfiel changed the title feat: Overlay linting, decorators, preprocessors, types extension support feat(cli): Overlay linting, decorators, preprocessors, types extension support Feb 10, 2025
@jeremyfiel jeremyfiel changed the title feat(cli): Overlay linting, decorators, preprocessors, types extension support feat: overlay linting, decorators, preprocessors, types extension support Feb 10, 2025
jeremyfiel added a commit to jeremyfiel/redocly-cli that referenced this pull request Feb 10, 2025
* updated references to use defined NodeTypes.
* update `any` to `unknown`
* run prettier
* rebase latest changes from main
* refactor to match Redocly#1898 type definitions

related Redocly#1246
@jeremyfiel jeremyfiel force-pushed the feat/overlay-linting branch 2 times, most recently from b9f71e5 to 4810f51 Compare February 10, 2025 01:56
@jeremyfiel
Copy link
Contributor Author

docs to be added separately

jeremyfiel added a commit to jeremyfiel/redocly-cli that referenced this pull request Feb 10, 2025
* updated references to use defined NodeTypes.
* update `any` to `unknown`
* run prettier
* rebase latest changes from main
* refactor to match Redocly#1898 type definitions

related Redocly#1246
jeremyfiel added a commit to jeremyfiel/redocly-cli that referenced this pull request Feb 11, 2025
* updated references to use defined NodeTypes.
* update `any` to `unknown`
* run prettier
* rebase latest changes from main
* refactor to match Redocly#1898 type definitions

related Redocly#1246
jeremyfiel added a commit to jeremyfiel/redocly-cli that referenced this pull request Feb 11, 2025
* updated references to use defined NodeTypes.
* update `any` to `unknown`
* run prettier
* rebase latest changes from main
* refactor to match Redocly#1898 type definitions

related Redocly#1246
@tatomyr
Copy link
Collaborator

tatomyr commented Feb 26, 2025

I have to check this locally. Will try to do it today. Meanwhile, I'm updating your branch.

Copy link
Collaborator

@tatomyr tatomyr left a comment

Choose a reason for hiding this comment

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

Looks like you're missing handling overlay rules in config/builtIn.ts and config/config-resolvers.ts. Could you add a test for linting/bundling and an example of the Overlay description in the resource/ folder?

@jeremyfiel jeremyfiel force-pushed the feat/overlay-linting branch 2 times, most recently from d4bbb56 to 19ec47f Compare March 1, 2025 06:42
* updated references to use defined NodeTypes.
* update `any` to `unknown`
* run prettier

related Redocly#1246
@jeremyfiel jeremyfiel force-pushed the feat/overlay-linting branch 2 times, most recently from 6fbb445 to 7c0e2cb Compare March 1, 2025 07:18
[SpecVersion.OAS3_1]: { ...rawConfig.decorators, ...rawConfig.oas3_1Decorators },
[SpecVersion.Async2]: { ...rawConfig.decorators, ...rawConfig.async2Decorators },
[SpecVersion.Async3]: { ...rawConfig.decorators, ...rawConfig.async3Decorators },
[SpecVersion.Arazzo1]: { ...rawConfig.arazzo1Decorators },
Copy link
Contributor Author

Choose a reason for hiding this comment

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

should this line include ...rawConfig.decorators?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Most likely yes. @DmitryAnansky what do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

these can be added in an separate pr unrelated to Overlays.. I found this omission when updating this pr.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sure, thanks.

[SpecVersion.OAS3_1]: { ...rawConfig.preprocessors, ...rawConfig.oas3_1Preprocessors },
[SpecVersion.Async2]: { ...rawConfig.preprocessors, ...rawConfig.async2Preprocessors },
[SpecVersion.Async3]: { ...rawConfig.preprocessors, ...rawConfig.async3Preprocessors },
[SpecVersion.Arazzo1]: { ...rawConfig.arazzo1Preprocessors },
Copy link
Contributor Author

Choose a reason for hiding this comment

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

should this line include ...rawConfig.preprocessors?

@jeremyfiel jeremyfiel requested a review from tatomyr March 1, 2025 07:38
@jeremyfiel jeremyfiel mentioned this pull request Mar 1, 2025
10 tasks
Copy link
Collaborator

@tatomyr tatomyr left a comment

Choose a reason for hiding this comment

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

Left a minor suggestion, otherwise looks good 🎉

* linting
* preprocessors
* decorators
* type extensions
@jeremyfiel jeremyfiel force-pushed the feat/overlay-linting branch from 7c0e2cb to 7abbfe2 Compare March 1, 2025 08:44
Copy link
Collaborator

@tatomyr tatomyr left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution @jeremyfiel 🎉. Looking forward to the docs updates!

@tatomyr tatomyr merged commit e11f8a1 into Redocly:main Mar 3, 2025
38 checks passed
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