Skip to content
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

fix: bundle original spec to account for multi-file API definitions #252

Merged
merged 1 commit into from
Mar 9, 2021

Conversation

dpopp07
Copy link
Member

@dpopp07 dpopp07 commented Feb 25, 2021

We do some validations on the "resolved spec" or the full API definition with all of its
references resolved into one large document. This takes multi-file specs into account and
resolves all references, even to other files. However, some validations are performed only
on the original spec as it provides some benefits, such as gathering all schemas without
worrying about duplicates. The problem with our current approach is that, if the spec is
split into multiple files, we only validate the entry file and none of the others.

This adds a quick step to "bundle" all of the files together into one "file" that only has
internal references. This way, the unresolved "js spec" will represent the entire definition.

Resolves #229

Copy link
Contributor

@barrett-schonefeld barrett-schonefeld left a comment

Choose a reason for hiding this comment

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

Looks good! 👍

We do some validations on the "resolved spec" or the full API definition with all of its
references resolved into one large document. This takes multi-file specs into account and
resolves all references, even to other files. However, some validations are performed only
on the original spec as it provides some benefits, such as gathering all schemas without
worrying about duplicates. The problem with our current approach is that, if the spec is
split into multiple files, we only validate the entry file and none of the others.

This adds a quick step to "bundle" all of the files together into one "file" that only has
internal references. This way, the unresolved "js spec" will represent the entire definition.
@dpopp07 dpopp07 merged commit f241c8b into main Mar 9, 2021
@dpopp07 dpopp07 deleted the dp/multi-file-fix branch March 9, 2021 17:03
dpopp07 pushed a commit that referenced this pull request Mar 9, 2021
## [0.35.2](v0.35.1...v0.35.2) (2021-03-09)

### Bug Fixes

* bundle original spec to account for multi-file API definitions ([#252](#252)) ([f241c8b](f241c8b))
@dpopp07
Copy link
Member Author

dpopp07 commented Mar 9, 2021

🎉 This PR is included in version 0.35.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CLI does not dereference $refs
2 participants