Skip to content

Conversation

@blva
Copy link
Collaborator

@blva blva commented Feb 20, 2025

Proposed changes

Jira ticket: CLOUDP-301106

Closes #[issue number]

Checklist

  • I have signed the MongoDB CLA
  • I have added tests that prove my fix is effective or that my feature works

Changes to Spectral

  • I have read the README file for Spectral Updates

Further comments

@blva blva force-pushed the CLOUDP-301106-preview-folder branch from 3d4c487 to 68aed82 Compare February 20, 2025 14:09
@blva blva marked this pull request as ready for review February 20, 2025 14:19
@blva blva requested a review from a team as a code owner February 20, 2025 14:19
mv -f "openapi-foas.yaml" "./openapi/v2.yaml"

echo "Moving preview files to preview folder"
find ./openapi/v2 -type f -name "*preview*" -exec mv -f {} ./openapi/preview/ \;
Copy link
Collaborator

Choose a reason for hiding this comment

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

we should move only private preview specs into private-preview folder and keep the public preview spec (it should be only 1 spec) with the stable.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

works for me!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

what about versions, where should we store them?

Copy link
Collaborator

Choose a reason for hiding this comment

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

What do you mean by versions? Do you mean the versions.json file?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes, as of now I was adding the list of preview versions into the preview folder, but the command will return both private and public

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it makes sense to have the openapi/v2/versions.json containing the public preview and openapi/v2/private-preview/versions.json with only the private preview versions. WDYT?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

hmmm can be, should we then leave the preview under v2 maybe?

set -eou pipefail

echo "Running FOAS CLI versions command"
foascli versions -s openapi-foas.json -o ./openapi/v2/versions.json --env "${target_env:?}"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I see that the PR has the .keep file. We should remove them and add .keep in the gitignore

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

if i add it i can't keep the file, would like to keep it to avoid trying to create the folder during ci/cd

Copy link
Collaborator

@andreaangiolillo andreaangiolillo Feb 20, 2025

Choose a reason for hiding this comment

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

you can add a version.json file instead of the .keep. The file will be overriden in the next action run

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ok!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

much better, thanks!

Copy link
Collaborator

@andreaangiolillo andreaangiolillo left a comment

Choose a reason for hiding this comment

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

LGTM

@blva blva merged commit 6bde71a into main Feb 20, 2025
12 checks passed
@blva blva deleted the CLOUDP-301106-preview-folder branch February 20, 2025 15:11
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.

2 participants