feat!: improve names for anonymous schemas and messages#223
Closed
jonaslagoni wants to merge 3 commits intoasyncapi:masterfrom
Closed
feat!: improve names for anonymous schemas and messages#223jonaslagoni wants to merge 3 commits intoasyncapi:masterfrom
jonaslagoni wants to merge 3 commits intoasyncapi:masterfrom
Conversation
|
Kudos, SonarCloud Quality Gate passed!
|
Member
Author
|
I am gonna close this PR and introduce it gradually as much as possible. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WIP: will change as I go depending on the output it provide.
Description
This PR gives anonymous schemas and messages meaningful ids instead of
<anonymous-message-x>as well as giving parameters and header root schemas meaningful uid's. We switch over to use a path naming approach so one knows where the anonymous schema or name is located in the document.Rules of naming
These are the rules for the uid generation:
<channel-name>Messageaccording to what channel it belong to.<channel-name><parameter-name>Parameter<message-name><header-name>Header<message-name>PayloadRegarding the naming of nested schemas here is the procedure, the name will cumulative based on how deep the nesting goes, here is the rules for cumulating the name:
<parent-schema-name><property-name>Objectis appended to the nameSo the full name of the anonymous schema will be
<parent-schema-name><property-name><schema-type>SchemaThe special cases
What it introduces
Related issue(s)
fixes #176