-
-
Notifications
You must be signed in to change notification settings - Fork 437
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
openapi3: improve internalization ref naming to avoid collisions (#955)
* Add failing test case * Improve default name internalisation to avoid collisions * Set ref path when resolving refs too * Update unit tests Still got some work to do, the recursive test still fails * Make InternalizeRefs deterministic This makes resolving references & internalising references determinstic by sorting map for loops by key. Ensures refs are resolved in the same order, depending on the spec this can result in a different (but equal value) internalised spec. * Ensure root document url is set The unmarshal function was removing the .url value * Ensure internalised names are valid * Update internalized golden files * Maintain first path assigned to each reference This will be the path at the closest point to the actual definition in the reference chain. Also trim . from the start of paths * Tidy up & relocation some functions * Use use OS repsecting file seperator * Check for duplicate references to tidy up internalized spec * Swap condition checks & add comment * Maintain consistent slash, only adjusting for OS specific when needed * Adjust documentation * Internalised -> internalized Excuse my British English
- Loading branch information
1 parent
a27c9e7
commit 0ed9f5d
Showing
21 changed files
with
614 additions
and
169 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
Oops, something went wrong.