forked from asyncapi/spec-json-schemas
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: AsyncAPI v3 shows warning in Studio and IntelliJ plugin when ref…
…erencing a json schema Rollback AnySchema and AvroSchema asyncapi#494 asyncapi/jasyncapi-idea-plugin#49
- Loading branch information
Showing
3 changed files
with
38 additions
and
88 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,16 @@ | ||
{ | ||
"$id": "http://asyncapi.com/definitions/3.0.0/anySchema.json", | ||
"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.", | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"type": "object", | ||
"description": "An object representing either a Reference, a Schema or a Multi Format Schema", | ||
"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" | ||
} | ||
] | ||
"$id": "http://asyncapi.com/definitions/3.0.0/anySchema.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