-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds a system in place to emit warnings if a schema is parsed and it doesn't have the OAS schema dialect for OpenAPI 3.1. My expectation is very few people will consider using over schema dialects and likely no-one will need this message, but if you did it could be quite confusing if this gem just seems to perform oddly with a different schema dialect. As this was relatively uncharted territory for this gem I've had to be a bit creative with implementing this. Without a clear place to hook this in, I've added it to the validation route of schemas. Since schemas are lazily parsed, I've made warnings for a document be a lazy loaded attribute that forces a validation run first so it can provide a complete list. I didn't want this gem to be super annoying and output warnings on every schema so I've configured this to only warn once per unsupported schema dialect.
- Loading branch information
Showing
9 changed files
with
284 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.