-
Notifications
You must be signed in to change notification settings - Fork 269
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix array references rewrites (#5634)
- Loading branch information
1 parent
6459dcb
commit 7d24761
Showing
6 changed files
with
191 additions
and
0 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
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
22 changes: 22 additions & 0 deletions
22
...l/util-provider/src/test/resources/io/apicurio/registry/content/dereference/customer.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"$id": "https://test/schemas/CustomerSchema.json", | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"title": "Customer", | ||
"type": "object", | ||
"properties": { | ||
"customerId": { | ||
"type": "string", | ||
"description": "A unique identifier for the customer." | ||
}, | ||
"name": { | ||
"type": "string", | ||
"description": "The full name of the customer." | ||
}, | ||
"email": { | ||
"type": "string", | ||
"format": "email", | ||
"description": "The email address of the customer." | ||
} | ||
}, | ||
"required": ["customerId", "name", "email"] | ||
} |
83 changes: 83 additions & 0 deletions
83
...der/src/test/resources/io/apicurio/registry/content/dereference/expected-order-deref.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
{ | ||
"allOf" : [ { | ||
"title" : "Customer", | ||
"type" : "object", | ||
"properties" : { | ||
"customerId" : { | ||
"description" : "A unique identifier for the customer.", | ||
"type" : "string" | ||
}, | ||
"name" : { | ||
"description" : "The full name of the customer.", | ||
"type" : "string" | ||
}, | ||
"email" : { | ||
"format" : "email", | ||
"description" : "The email address of the customer.", | ||
"type" : "string" | ||
} | ||
}, | ||
"required" : [ "customerId", "name", "email" ] | ||
} ], | ||
"oneOf" : [ { | ||
"title" : "Customer", | ||
"type" : "object", | ||
"properties" : { | ||
"customerId" : { | ||
"description" : "A unique identifier for the customer.", | ||
"type" : "string" | ||
}, | ||
"name" : { | ||
"description" : "The full name of the customer.", | ||
"type" : "string" | ||
}, | ||
"email" : { | ||
"format" : "email", | ||
"description" : "The email address of the customer.", | ||
"type" : "string" | ||
} | ||
}, | ||
"required" : [ "customerId", "name", "email" ] | ||
} ], | ||
"$schema" : "http://json-schema.org/draft-07/schema#", | ||
"anyOf" : [ { | ||
"title" : "Customer", | ||
"type" : "object", | ||
"properties" : { | ||
"customerId" : { | ||
"description" : "A unique identifier for the customer.", | ||
"type" : "string" | ||
}, | ||
"name" : { | ||
"description" : "The full name of the customer.", | ||
"type" : "string" | ||
}, | ||
"email" : { | ||
"format" : "email", | ||
"description" : "The email address of the customer.", | ||
"type" : "string" | ||
} | ||
}, | ||
"required" : [ "customerId", "name", "email" ] | ||
} ], | ||
"title" : "Order", | ||
"type" : "object", | ||
"properties" : { | ||
"orderId" : { | ||
"description" : "A unique identifier for the order.", | ||
"type" : "string" | ||
}, | ||
"orderDate" : { | ||
"format" : "date-time", | ||
"description" : "The date when the order was placed.", | ||
"type" : "string" | ||
}, | ||
"orderTotal" : { | ||
"format" : "float", | ||
"description" : "The total amount of the order.", | ||
"type" : "number" | ||
} | ||
}, | ||
"required" : [ "orderId", "customer", "orderTotal" ], | ||
"$id" : "https://test/schemas/OrderSchema.json" | ||
} |
42 changes: 42 additions & 0 deletions
42
...util/util-provider/src/test/resources/io/apicurio/registry/content/dereference/order.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"$id": "https://test/schemas/OrderSchema.json", | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "Order", | ||
"type": "object", | ||
"allOf": [ | ||
{ | ||
"$ref": "customer.json" | ||
} | ||
], | ||
"anyOf": [ | ||
{ | ||
"$ref": "customer.json" | ||
} | ||
], | ||
"oneOf": [ | ||
{ | ||
"$ref": "customer.json" | ||
} | ||
], | ||
"properties": { | ||
"orderId": { | ||
"type": "string", | ||
"description": "A unique identifier for the order." | ||
}, | ||
"orderDate": { | ||
"type": "string", | ||
"format": "date-time", | ||
"description": "The date when the order was placed." | ||
}, | ||
"orderTotal": { | ||
"type": "number", | ||
"format": "float", | ||
"description": "The total amount of the order." | ||
} | ||
}, | ||
"required": [ | ||
"orderId", | ||
"customer", | ||
"orderTotal" | ||
] | ||
} |