mirror of
https://github.com/adidas/api-guidelines.git
synced 2025-10-25 15:19:19 +00:00
use supermodel
This commit is contained in:
22
supermodel/adidas/examples/order/Order.yaml
Normal file
22
supermodel/adidas/examples/order/Order.yaml
Normal 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
|
||||
|
||||
23
supermodel/adidas/examples/order/api/Order.yaml
Normal file
23
supermodel/adidas/examples/order/api/Order.yaml
Normal 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
|
||||
14
supermodel/adidas/examples/order/api/OrderPatch.yaml
Normal file
14
supermodel/adidas/examples/order/api/OrderPatch.yaml
Normal 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
|
||||
36
supermodel/adidas/examples/order/api/Orders.yaml
Normal file
36
supermodel/adidas/examples/order/api/Orders.yaml
Normal 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
|
||||
9
supermodel/adidas/examples/order/api/ProblemDetail.yaml
Normal file
9
supermodel/adidas/examples/order/api/ProblemDetail.yaml
Normal 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
|
||||
|
||||
Reference in New Issue
Block a user