-
Notifications
You must be signed in to change notification settings - Fork 155
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: add typings and interfaces for Overlay Specification v1.0.0 #1775
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 1675a9c The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
f401f1e
to
a48e89f
Compare
a48e89f
to
d42c201
Compare
d42c201
to
ddfc391
Compare
thanks for review. I actually missed using the defined NodeType references, so I updated those. |
ddfc391
to
cb491c0
Compare
* updated references to use defined NodeTypes. * update `any` to `unknown` * run prettier related Redocly#1246
cb491c0
to
1675a9c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are actually a step away from implementing overlays linting. All you need to do is extend detectSpec
to recognize overlay files and add a couple of corresponding overlay sections in rules, decorators, and preprocessors. If you decide to give it a try, feel free to ping me whenever you need any guidance.
NB: There is a big refactoring PR coming up, so please postpone updating this PR until it's merged (should be merged quite soon).
"@redocly/cli": minor | ||
--- | ||
|
||
Add typings and interfaces for Overlay Specification v1.0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add typings and interfaces for Overlay Specification v1.0.0 | |
Added typings and interfaces for Overlay Specification v1.0.0. |
extensionsPrefix: 'x-', | ||
}; | ||
|
||
export const OverlayTypes: Record<string, NodeType | NormalizedScalarSchema> = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export const OverlayTypes: Record<string, NodeType | NormalizedScalarSchema> = { | |
export const OverlayTypes: Record<string, NodeType> = { |
const Extends: NormalizedScalarSchema = { | ||
type: 'string', | ||
resolvable: true, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const Extends: NormalizedScalarSchema = { | |
type: 'string', | |
resolvable: true, | |
}; |
export const OverlayTypes: Record<string, NodeType | NormalizedScalarSchema> = { | ||
Root, | ||
Info, | ||
Extends, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extends, |
properties: { | ||
overlay: { type: 'string' }, | ||
info: 'Info', | ||
extends: 'Extends', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extends: 'Extends', | |
extends: { type: 'string' }, |
related #1246
What/Why/How?
Provides typings and interfaces for a structured Overlay description per the https://github.com/OAI/Overlay-Specification
Hopefully this is the first step to providing support for this new specification!
Can't wait to see what you build!
Reference
https://github.com/OAI/Overlay-Specification/releases/tag/1.0.0
Testing
Screenshots (optional)
Check yourself
Security