Skip to content

Commit a42b329

Browse files
committed
Fix OpenAPI spec linting recommendations
(from default Spectral ruleset)
1 parent a5c2b17 commit a42b329

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

swagger.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,16 @@ info:
99
license:
1010
name: MIT
1111
url: 'https://opensource.org/licenses/MIT'
12+
contact:
13+
name: B2B API Support
1214
tags:
1315
-
1416
name: Order
1517
description: 'API for customer orders'
1618
paths:
1719
/orders:
1820
post:
21+
operationId: createCustomerOrder
1922
tags: [Order]
2023
description: 'Create new customer order'
2124
responses: { '200': { description: 'New customer order is created', content: { application/json: { schema: { $ref: '#/components/schemas/OrderConfirmation' } } } } }
@@ -32,7 +35,7 @@ components:
3235
properties: { cid: { type: string, uniqueItems: true, example: JS0815DE }, orderLines: { $ref: '#/components/schemas/OrderLines' }, orderLinesData: { $ref: '#/components/schemas/OrderLinesData' } }
3336
OrderConfirmation:
3437
required: [cid, orderNo, paymentDue]
35-
properties: { cid: { type: string, uniqueItems: true, example: JS0815DE }, orderNo: { type: string, uniqueItems: true, example: 3d06ac5e1bdf39d26392f8100f124742 }, paymentDue: { description: 'All payments are due 14 days after order placement', type: string, format: date, example: '2018-01-19T07:02:06.800Z' } }
38+
properties: { cid: { type: string, uniqueItems: true, example: JS0815DE }, orderNo: { type: string, uniqueItems: true, example: 3d06ac5e1bdf39d26392f8100f124742 }, paymentDue: { description: 'All payments are due 14 days after order placement', type: string, format: date, example: '2018-01-19' } }
3639
OrderLine:
3740
description: 'Order line in default JSON format'
3841
required: [productId, quantity]

0 commit comments

Comments
 (0)