-
-
Notifications
You must be signed in to change notification settings - Fork 440
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
openapi3: introduce `ReferencesComponentInRootDocument(doc *T, ref co…
…mponentRef) (string, bool)` (#945) * Add function to check if a schema matches the root document's It does this by keeping track of the source file paths of schemas in multi-file'd specs. This enables the amalgamation of schemas which reference the same underlying model which removes *very annoying* to use anonymous structs in generated models when using codegen tools like oapi-codegen. * Move logic to code generation file And populate all ref types * Move MatchesSchemaInRootDocument to helper file * Make matches root component function generic * Protect against null refs * Update docs * Add function comments * Replace swagger links with OAI spec * Fix bugs, rebase issues, add tests * Add example to README.md * Use JSON pointers to map from name to components
- Loading branch information
1 parent
78b7c31
commit 061c378
Showing
19 changed files
with
706 additions
and
25 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
Oops, something went wrong.