-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
fix: wrong validation with AsyncAPI v3 in VS Code and JetBrains IDEs #495
Merged
Merged
Changes from 15 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
0396524
fix: AsyncAPI v3 shows warning in Studio and IntelliJ plugin when ref…
Pakisan 8af32be
fix: AsyncAPI v3 shows warning in Studio and IntelliJ plugin when ref…
Pakisan 518e3e0
fix: AsyncAPI v3 shows warning in Studio and IntelliJ plugin when ref…
Pakisan 78ce54d
Merge branch 'master' into fix/494
Pakisan b5f2139
fix: AsyncAPI v3 shows warning in Studio and IntelliJ plugin when ref…
Pakisan 87a6097
fix: AsyncAPI v3 shows warning in Studio and IntelliJ plugin when ref…
Pakisan 981c80d
fix: AsyncAPI v3 shows warning in Studio and IntelliJ plugin when ref…
Pakisan 212cc82
Merge branch 'master' into fix/494
Pakisan e8ee4a2
Merge branch 'master' into fix/494
Pakisan b573b54
Update .gitignore
Pakisan 62c5193
fix: AsyncAPI v3 shows warning in Studio and IntelliJ plugin when ref…
Pakisan 297e778
fix: AsyncAPI v3 shows warning in Studio and IntelliJ plugin when ref…
Pakisan dddb3d3
fix: AsyncAPI v3 shows warning in Studio and IntelliJ plugin when ref…
Pakisan a4c5ef0
fix: AsyncAPI v3 shows warning in Studio and IntelliJ plugin when ref…
Pakisan acfb26e
fix: AsyncAPI v3 shows warning in Studio and IntelliJ plugin when ref…
Pakisan 469431c
fix: AsyncAPI v3 shows warning in Studio and IntelliJ plugin when ref…
Pakisan b45e610
fix: AsyncAPI v3 shows warning in Studio and IntelliJ plugin when ref…
Pakisan 52b06c5
fix: AsyncAPI v3 shows warning in Studio and IntelliJ plugin when ref…
Pakisan d34130d
fix: AsyncAPI v3 shows warning in Studio and IntelliJ plugin when ref…
Pakisan a9a7d47
fix: AsyncAPI v3 shows warning in Studio and IntelliJ plugin when ref…
Pakisan eba77ed
Merge branch 'master' into fix/494
smoya 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
node_modules | ||
.nyc_output | ||
.vscode | ||
coverage | ||
coverage | ||
|
||
.DS_Store |
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 |
---|---|---|
@@ -1,16 +1,35 @@ | ||
{ | ||
"if": { | ||
"required": [ | ||
"schema" | ||
] | ||
}, | ||
"then": { | ||
"$ref": "http://asyncapi.com/definitions/3.0.0/multiFormatSchema.json" | ||
}, | ||
"else": { | ||
"$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" | ||
}, | ||
"description": "An object representing either a schema or a multiFormatSchema based on the existence of the 'schema' property. If the property 'schema' is present, use the multi-format schema. Use the default AsyncAPI Schema otherwise.", | ||
"$id": "http://asyncapi.com/definitions/3.0.0/anySchema.json", | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "http://asyncapi.com/definitions/3.0.0/anySchema.json" | ||
"type": "object", | ||
"description": "An object representing either a Reference, a Schema or a Multi Format Schema", | ||
"properties": { | ||
"schemaFormat": { | ||
"type": "string", | ||
"description": "Supported Schema format" | ||
}, | ||
"schema": { | ||
"type": "object", | ||
"description": "Schema definition" | ||
}, | ||
"$ref": { | ||
"type": "string", | ||
"description": "Reference to schema" | ||
} | ||
}, | ||
Pakisan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"oneOf": [ | ||
{ | ||
"description": "Because of $ref collision in Reference and AsyncAPI Schema(includes $ref from Json Schema)", | ||
"not": {"required": ["schemaFormat", "schema"]}, | ||
"$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" | ||
}, | ||
{ | ||
"type": "object", | ||
"required": ["schemaFormat", "schema"], | ||
"not": {"required": ["$ref"]}, | ||
"minProperties": 2, | ||
"maxProperties": 2, | ||
"$ref": "http://asyncapi.com/definitions/3.0.0/multiFormatSchema.json" | ||
} | ||
] | ||
} |
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.
Oops, something went wrong.
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.
I dont think these changes with
additionalProperties
is necessary, and on the other side, are you not allowed to have additional properties in Avro? 🤔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.
As I remember Avro is allows only defined attributes. For example Record - https://avro.apache.org/docs/1.11.1/specification/#schema-record
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.
Seems like additional properties is allowed on the different levels of Avro: https://asyncapi.slack.com/archives/C0230UAM6R3/p1712059889567579?thread_ts=1711713980.293369&cid=C0230UAM6R3
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 removed restriction