use supermodel

This commit is contained in:
Zdenek Nemec
2019-11-18 08:31:00 +00:00
parent c9df0c584b
commit ade9e04665
9 changed files with 1368 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
$id: http://supermodel.io/adidas/examples/order/Order
$schema: http://json-schema.org/draft-07/schema#
title: Order
type: object
description: Order model description
properties:
orderNumber:
type: number
itemCount:
type: number
status:
type: string
required:
- orderNumber
- itemCount
examples:
- orderNumber: 42
itemCount: 3
status: pending

View File

@@ -0,0 +1,23 @@
$id: http://supermodel.io/adidas/examples/order/api/Order
$schema: http://json-schema.org/draft-07/schema#
title: Order HAL Representation
type: object
allOf:
- $ref: http://supermodel.io/adidas/api/HAL
- $ref: http://supermodel.io/adidas/examples/order/Order
examples:
- _links:
self:
href: /orders/1234
edit:
href: /orders/1234
delete:
href: /orders/1234
profile:
href: https://adidas-group.com/gdm/OMS
orderNumber: 1234
itemCount: 42
status: pending

View File

@@ -0,0 +1,14 @@
$id: http://supermodel.io/adidas/examples/order/api/OrderPatch
$schema: http://json-schema.org/draft-07/schema#
title: OrderPatch
description: OrderPatch model description
type: object
allOf:
- $ref: 'http://supermodel.io/adidas/examples/order/Order'
examples:
- status: cancelled
orderNumber: 1
itemCount: 2

View File

@@ -0,0 +1,36 @@
$id: http://supermodel.io/adidas/examples/order/api/Orders
$schema: http://json-schema.org/draft-07/schema#
title: Collection of Orders HAL Representation
type: object
allOf:
- $ref: http://supermodel.io/adidas/api/HAL
examples:
- _links:
self:
href: /orders
create:
href: /orders
next:
href: /orders?offset=5&limit=5
first:
href: /orders?offset=0&limit=5
last:
href: /orders?offset=40&limit=5
_embedded:
order:
- _links:
self:
href: /orders/1234
edit:
href: /orders/1234
delete:
href: /orders/1234
profile:
href: https://adidas-group.com/gdm/OMS
orderNumber: 1234
itemCount: 42
status: pending

View File

@@ -0,0 +1,9 @@
$id: http://supermodel.io/adidas/examples/order/api/ProblemDetail
$schema: http://json-schema.org/draft-07/schema#
title: Problem Detail
type: object
allOf:
- $ref: http://supermodel.io/adidas/api/ProblemDetail