Skip to content

Commit

Permalink
fix: AsyncAPI v3 shows warning in Studio and IntelliJ plugin when ref…
Browse files Browse the repository at this point in the history
…erencing a json schema

New multiFormatSchema validation rules

asyncapi#494
asyncapi/jasyncapi-idea-plugin#49
  • Loading branch information
Pakisan committed Mar 25, 2024
1 parent a4c5ef0 commit acfb26e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 72 deletions.
17 changes: 1 addition & 16 deletions definitions/3.0.0/anySchema.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,11 @@
"description": "Reference to schema"
}
},
"minProperties": 1,
"oneOf": [
{
"description": "Because of $ref collision in Reference and AsyncAPI Schema(includes $ref from Json Schema)",
"not": {"required": ["schemaFormat", "schema"]},
"anyOf": [
{
"type": "object",
"required": ["$ref"],
"not": {"required": ["schemaFormat", "schema"]},
"minProperties": 1,
"maxProperties": 1,
"$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json"
},
{
"type": "object",
"not": {"required": ["schemaFormat", "schema"]},
"$ref": "http://asyncapi.com/definitions/3.0.0/schema.json"
}
]
"$ref": "http://asyncapi.com/definitions/3.0.0/schema.json"
},
{
"type": "object",
Expand Down
29 changes: 1 addition & 28 deletions schemas/3.0.0-without-$id.json
Original file line number Diff line number Diff line change
Expand Up @@ -2702,7 +2702,6 @@
"description": "Reference to schema"
}
},
"minProperties": 1,
"oneOf": [
{
"description": "Because of $ref collision in Reference and AsyncAPI Schema(includes $ref from Json Schema)",
Expand All @@ -2712,33 +2711,7 @@
"schema"
]
},
"anyOf": [
{
"type": "object",
"required": [
"$ref"
],
"not": {
"required": [
"schemaFormat",
"schema"
]
},
"minProperties": 1,
"maxProperties": 1,
"$ref": "#/definitions/Reference"
},
{
"type": "object",
"not": {
"required": [
"schemaFormat",
"schema"
]
},
"$ref": "#/definitions/schema"
}
]
"$ref": "#/definitions/schema"
},
{
"type": "object",
Expand Down
29 changes: 1 addition & 28 deletions schemas/3.0.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -2752,7 +2752,6 @@
"description": "Reference to schema"
}
},
"minProperties": 1,
"oneOf": [
{
"description": "Because of $ref collision in Reference and AsyncAPI Schema(includes $ref from Json Schema)",
Expand All @@ -2762,33 +2761,7 @@
"schema"
]
},
"anyOf": [
{
"type": "object",
"required": [
"$ref"
],
"not": {
"required": [
"schemaFormat",
"schema"
]
},
"minProperties": 1,
"maxProperties": 1,
"$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json"
},
{
"type": "object",
"not": {
"required": [
"schemaFormat",
"schema"
]
},
"$ref": "http://asyncapi.com/definitions/3.0.0/schema.json"
}
]
"$ref": "http://asyncapi.com/definitions/3.0.0/schema.json"
},
{
"type": "object",
Expand Down

0 comments on commit acfb26e

Please sign in to comment.