-
Couldn't load subscription status.
- Fork 14
CLOUDP-302671: Update v2 to filtered OAS #497
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
Conversation
|
LGTM for Approach! Thank you |
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.
LGTM. Thank you!
|
|
||
| echo "Generate the versions.json file for private preview APIs" | ||
| foascli versions --spec ./openapi/v2.json --stability-level PRIVATE-PREVIEW -o ./openapi/v2/private/versions.json --env "${target_env:?}" | ||
| foascli versions --spec ./openapi/.raw/v2.json --stability-level PRIVATE-PREVIEW -o ./openapi/v2/private/versions.json --env "${target_env:?}" |
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.
Could you filter out from the branded preview the v2 spec and the v2 in the .raw?
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.
not sure I follow, but for the branded preview, I made it use the filtered version, since it would hide the hidden contents
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.
There is a step in the release process where we create the branded preview (branded_preview.sh), and I see that right now https://htmlpreview.github.io/?https://github.com/mongodb/openapi/blob/main/openapi/branded-preview.html we list v2.json and v2.yaml. I am wondering if with these changes we will start to see also the spec in .raw 🤔 This can also be a follow up ticket. Thanks!
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.
ohhh got it! good point, not sure and I hope not :D If we see it I'll remove in a follow-up
|
|
||
| const config = { | ||
| defaultOasFilePath: path.join(rootDir, 'openapi', 'v2.json'), | ||
| defaultOasFilePath: path.join(rootDir, 'openapi', '.raw', 'v2.json'), |
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.
❤️
Proposed changes
_Jira ticket:_CLOUDP-302671
Context: The OAS stored under v2.yaml and v2.json is the same used for the preview link in our repo. However, that OAS was not being filtered, containing extra extensions such as
x-xgen-hidden-env,x-xgen-owner-team, IPA extensions and others. Given that this is the upper OAS in the repo, which is public, we have decided to filter out this APIx specific extensions out of them. However, we still find it very important to keep one raw, unfiltered OAS where we can see and track the full history of how extensions have changed. Furthermore, some tools will still leverage those extensions. To account for that, we opted for keeping an unfiltered raw file in a more hidden folder, to discourage external users to use it but still allow our tools and integrations to use an unfiltered file.Changes:
.raw/v2.yaml|json.raw/v2.yaml|jsonsince both IPA and versioning linting is performed in the extensionsCloses #[issue number]
Checklist
Changes to Spectral
Further comments