-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
feat: parse Avro name field to custom x-parser-schema-id #69
Merged
derberg
merged 12 commits into
asyncapi:master
from
damaru-inc:issues/68-copy-name-to-title
Sep 2, 2021
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
9444941
feat: The Avro name field is now copied to the resulting Json schema …
MichaelDavisSolace 6f07557
Fixed sonarcloud issues.
MichaelDavisSolace c72497c
Instead of putting the avro name into the json title field, we put it…
MichaelDavisSolace 1e5a71a
Updated README, added support for namespaces.
MichaelDavisSolace 9cb75df
Addressed PR comments
MichaelDavisSolace 897e551
Minor change based on PR comments.
MichaelDavisSolace 9adbbaa
Added quotes to fields Person-1.9.0-namespace.avsc
MichaelDavisSolace f526005
Merge branch 'master' into issues/68-copy-name-to-title
damaru-inc 996620c
Minor change to README.
MichaelDavisSolace 5789d60
Merge branch 'master' into issues/68-copy-name-to-title
damaru-inc c760f11
Merge branch 'master' into issues/68-copy-name-to-title
damaru-inc f98a07b
Minor code change to clarify logic.
MichaelDavisSolace File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
asyncapi: 2.0.0 | ||
info: | ||
title: My API | ||
version: '1.0.0' | ||
channels: | ||
mychannel: | ||
publish: | ||
message: | ||
schemaFormat: application/vnd.apache.avro;version=1.9.0 | ||
payload: | ||
$ref: 'schemas/Person-1.9.0-namespace.avsc' |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"name": "Person", | ||
"namespace": "com.company", | ||
"type": "record", | ||
"fields": [ | ||
{"name": "name", "type": "string", "example": "Donkey"}, | ||
{"name": "age", "type": ["null", "int"], "default": null, "example": "123"}, | ||
{ | ||
"name": "favoriteProgrammingLanguage", | ||
"type": {"name": "ProgrammingLanguage", "type": "enum", "symbols": ["JS", "Java", "Go", "Rust", "C"], "default": "JS"} | ||
}, | ||
{ | ||
"name": "address", | ||
"type": { | ||
"name": "Address", | ||
"type": "record", | ||
"fields": [{"name": "zipcode", "type": "int", "example": "53003"}] | ||
} | ||
}, | ||
{"name": "someid", "type": "uuid"} | ||
] | ||
} |
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll change that if you like, but I was just trying to be consistent with the style. Just above on line 26 we have:
if (avroDefinition.default !== undefined) jsonSchema.default = avroDefinition.default;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, I think now I remember why it was
avroDefinition.default !== undefined
, because probablyavroDefinition.default
could benull
which should be fine 🤔 sorry but can you change it back and add a proper code comment?