-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds support for JSON schema arrays, resolves issue #305
- Loading branch information
1 parent
c74c9aa
commit b96f7d4
Showing
10 changed files
with
190 additions
and
94 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
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 |
---|---|---|
|
@@ -34,5 +34,5 @@ definitions: | |
required: true | ||
year_founded: | ||
type: integer | ||
required: true | ||
required: false | ||
|
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,69 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "OrderSchema", | ||
"description": "Schema for order details", | ||
"type": "object", | ||
"properties": { | ||
"order_id": { | ||
"type": "string", | ||
"title": "Order ID", | ||
"description": "Unique identifier for the order" | ||
}, | ||
"order_timestamp": { | ||
"type": "string", | ||
"format": "date-time", | ||
"title": "Order Timestamp", | ||
"description": "Timestamp when the order was placed" | ||
}, | ||
"order_total": { | ||
"type": "integer", | ||
"title": "Order Total", | ||
"description": "Total amount of the order" | ||
}, | ||
"line_items": { | ||
"type": "array", | ||
"title": "Line Items", | ||
"items": { | ||
"type" : "integer" | ||
} | ||
}, | ||
"vouchers": { | ||
"type": "array", | ||
"title": "List of used vouchers", | ||
"items": [ | ||
{ | ||
"type": "integer" | ||
} | ||
] | ||
}, | ||
"customer_id": { | ||
"type": [ | ||
"string", | ||
"null" | ||
], | ||
"minLength": 10, | ||
"maxLength": 20, | ||
"title": "Customer ID", | ||
"description": "Unique identifier for the customer" | ||
}, | ||
"customer_email_address": { | ||
"type": "string", | ||
"format": "email", | ||
"title": "Customer Email Address", | ||
"description": "Email address of the customer" | ||
}, | ||
"processed_timestamp": { | ||
"type": "string", | ||
"format": "date-time", | ||
"title": "Processed Timestamp", | ||
"description": "Timestamp when the order was processed" | ||
} | ||
}, | ||
"required": [ | ||
"order_id", | ||
"order_timestamp", | ||
"order_total", | ||
"customer_email_address", | ||
"processed_timestamp" | ||
] | ||
} |
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
Oops, something went wrong.