io.zenwave360.sdk.resources.openapi.openapi-orders-relational.yml Maven / Gradle / Ivy
openapi: 3.0.1
info:
title: Zenwave 360 Generated API
version: 0.0.1
servers:
- url: http://localhost:8080/api/
tags:
- name: "Default"
- name: "Customer"
- name: "CustomerOrder"
paths:
/customers/search:
post:
summary: Search Customers
operationId: searchCustomers
tags: [Customer]
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/sort'
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/CustomerCriteria"
responses:
"200":
description: Customers
content:
application/json:
schema:
$ref: "#/components/schemas/CustomerPaginated"
/customers:
get:
summary: Find Customers
operationId: listCustomers
tags: [Customer]
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/sort'
responses:
"200":
description: Customers
content:
application/json:
schema:
$ref: "#/components/schemas/CustomerPaginated"
post:
summary: Create Customer
operationId: createCustomer
tags: [Customer]
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/Customer"
responses:
"201":
description: Customer
content:
application/json:
schema:
$ref: "#/components/schemas/Customer"
/customers/{id}:
parameters:
- name: id
in: path
description: Customer id
required: true
schema:
type: integer
format: int64
get:
summary: Get Customer by id
operationId: getCustomer
tags: [Customer]
responses:
"200":
description: Customer
content:
application/json:
schema:
$ref: "#/components/schemas/Customer"
put:
summary: Update Customer
operationId: updateCustomer
tags: [Customer]
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/Customer"
responses:
"200":
description: Customer
content:
application/json:
schema:
$ref: "#/components/schemas/Customer"
delete:
summary: Delete Customer
operationId: deleteCustomer
tags: [Customer]
responses:
"204":
description: Customer deleted
/customer-orders/search:
post:
summary: Search CustomerOrders
operationId: searchCustomerOrders
tags: [CustomerOrder]
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/sort'
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/CustomerOrderSearchCriteria"
responses:
"200":
description: CustomerOrders
content:
application/json:
schema:
$ref: "#/components/schemas/CustomerOrderPaginated"
/customer-orders:
get:
summary: Find CustomerOrders
operationId: listCustomerOrders
tags: [CustomerOrder]
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/sort'
responses:
"200":
description: CustomerOrders
content:
application/json:
schema:
$ref: "#/components/schemas/CustomerOrderPaginated"
post:
summary: Create CustomerOrder
operationId: createCustomerOrder
tags: [CustomerOrder]
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/CustomerOrder"
responses:
"201":
description: CustomerOrder
content:
application/json:
schema:
$ref: "#/components/schemas/CustomerOrder"
/customer-orders/{id}:
parameters:
- name: id
in: path
description: CustomerOrder id
required: true
schema:
type: integer
format: int64
get:
summary: Get CustomerOrder by id
operationId: getCustomerOrder
tags: [CustomerOrder]
responses:
"200":
description: CustomerOrder
content:
application/json:
schema:
$ref: "#/components/schemas/CustomerOrder"
put:
summary: Update CustomerOrder
operationId: updateCustomerOrder
tags: [CustomerOrder]
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/CustomerOrder"
responses:
"200":
description: CustomerOrder
content:
application/json:
schema:
$ref: "#/components/schemas/CustomerOrder"
delete:
summary: Delete CustomerOrder
operationId: deleteCustomerOrder
tags: [CustomerOrder]
responses:
"204":
description: CustomerOrder deleted
/shipping-details:
get:
summary: Find ShippingDetails
operationId: listShippingDetails
tags: [Customer]
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/sort'
responses:
"200":
description: ShippingDetails
content:
application/json:
schema:
$ref: "#/components/schemas/ShippingDetailsPaginated"
post:
summary: Create ShippingDetails
operationId: createShippingDetails
tags: [Customer]
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/ShippingDetails"
responses:
"201":
description: ShippingDetails
content:
application/json:
schema:
$ref: "#/components/schemas/ShippingDetails"
/shipping-details/{id}:
parameters:
- name: id
in: path
description: ShippingDetails id
required: true
schema:
type: integer
format: int64
get:
summary: Get ShippingDetails by id
operationId: getShippingDetails
tags: [Customer]
responses:
"200":
description: ShippingDetails
content:
application/json:
schema:
$ref: "#/components/schemas/ShippingDetails"
put:
summary: Update ShippingDetails
operationId: updateShippingDetails
tags: [Customer]
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/ShippingDetails"
responses:
"200":
description: ShippingDetails
content:
application/json:
schema:
$ref: "#/components/schemas/ShippingDetails"
delete:
summary: Delete ShippingDetails
operationId: deleteShippingDetails
tags: [Customer]
responses:
"204":
description: ShippingDetails deleted
/payment-details:
get:
summary: Find PaymentDetails
operationId: listPaymentDetails
tags: [Customer]
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/sort'
responses:
"200":
description: PaymentDetails
content:
application/json:
schema:
$ref: "#/components/schemas/PaymentDetailsPaginated"
post:
summary: Create PaymentDetails
operationId: createPaymentDetails
tags: [Customer]
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/PaymentDetails"
responses:
"201":
description: PaymentDetails
content:
application/json:
schema:
$ref: "#/components/schemas/PaymentDetails"
/payment-details/{id}:
parameters:
- name: id
in: path
description: PaymentDetails id
required: true
schema:
type: integer
format: int64
get:
summary: Get PaymentDetails by id
operationId: getPaymentDetails
tags: [Customer]
responses:
"200":
description: PaymentDetails
content:
application/json:
schema:
$ref: "#/components/schemas/PaymentDetails"
put:
summary: Update PaymentDetails
operationId: updatePaymentDetails
tags: [Customer]
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/PaymentDetails"
responses:
"200":
description: PaymentDetails
content:
application/json:
schema:
$ref: "#/components/schemas/PaymentDetails"
delete:
summary: Delete PaymentDetails
operationId: deletePaymentDetails
tags: [Customer]
responses:
"204":
description: PaymentDetails deleted
components:
schemas:
Customer:
type: "object"
x-business-entity: "Customer"
required:
- "firstName"
- "lastName"
- "password"
- "email"
- "username"
properties:
id:
format: "int64"
type: "integer"
firstName:
type: "string"
minLength: 3
maxLength: 250
lastName:
type: "string"
minLength: 3
maxLength: 250
password:
type: "string"
minLength: 3
maxLength: 250
email:
type: "string"
minLength: 3
maxLength: 250
username:
type: "string"
minLength: 3
maxLength: 250
CustomerPaginated:
allOf:
- $ref: "#/components/schemas/Page"
- x-business-entity-paginated: "Customer"
- properties:
content:
type: "array"
items:
$ref: "#/components/schemas/Customer"
CustomerOrder:
type: "object"
x-business-entity: "CustomerOrder"
properties:
id:
format: "int64"
type: "integer"
date:
type: "string"
format: "date-time"
shippingDetails:
$ref: "#/components/schemas/ShippingDetails"
description: "Shipping Details are stored embedded so they don't change\
\ if the original shipping address changes"
status:
$ref: "#/components/schemas/OrderStatus"
orderedItems:
type: "array"
items:
$ref: "#/components/schemas/OrderedItem"
customerId:
format: "int64"
type: "integer"
customer:
$ref: "#/components/schemas/Customer"
paymentDetailsId:
format: "int64"
type: "integer"
paymentDetails:
$ref: "#/components/schemas/PaymentDetails"
CustomerOrderPaginated:
allOf:
- $ref: "#/components/schemas/Page"
- x-business-entity-paginated: "CustomerOrder"
- properties:
content:
type: "array"
items:
$ref: "#/components/schemas/CustomerOrder"
ShippingDetails:
type: "object"
x-business-entity: "ShippingDetails"
properties:
id:
format: "int64"
type: "integer"
phone:
type: "string"
address:
type: "string"
ShippingDetailsPaginated:
allOf:
- $ref: "#/components/schemas/Page"
- x-business-entity-paginated: "ShippingDetails"
- properties:
content:
type: "array"
items:
$ref: "#/components/schemas/ShippingDetails"
CustomerOrderSearchCriteria:
type: "object"
x-business-entity: "CustomerOrderSearchCriteria"
properties:
id:
format: "int64"
type: "integer"
dateTo:
type: "string"
format: "date-time"
dateFrom:
type: "string"
format: "date-time"
status:
$ref: "#/components/schemas/OrderStatus"
CustomerOrderSearchCriteriaPaginated:
allOf:
- $ref: "#/components/schemas/Page"
- x-business-entity-paginated: "CustomerOrderSearchCriteria"
- properties:
content:
type: "array"
items:
$ref: "#/components/schemas/CustomerOrderSearchCriteria"
PaymentDetails:
type: "object"
x-business-entity: "PaymentDetails"
properties:
id:
format: "int64"
type: "integer"
cardHolderName:
type: "string"
creditCardNumber:
type: "string"
PaymentDetailsPaginated:
allOf:
- $ref: "#/components/schemas/Page"
- x-business-entity-paginated: "PaymentDetails"
- properties:
content:
type: "array"
items:
$ref: "#/components/schemas/PaymentDetails"
OrderedItem:
type: "object"
x-business-entity: "OrderedItem"
required:
- "name"
- "price"
properties:
id:
format: "int64"
type: "integer"
catalogItemId:
type: "integer"
format: "int64"
name:
type: "string"
minLength: 3
maxLength: 250
quantity:
type: "integer"
format: "int32"
price:
type: "number"
format: "double"
OrderedItemPaginated:
allOf:
- $ref: "#/components/schemas/Page"
- x-business-entity-paginated: "OrderedItem"
- properties:
content:
type: "array"
items:
$ref: "#/components/schemas/OrderedItem"
CustomerCriteria:
type: "object"
x-business-entity: "CustomerCriteria"
properties:
id:
format: "int64"
type: "integer"
firstName:
type: "string"
lastName:
type: "string"
password:
type: "string"
email:
type: "string"
username:
type: "string"
CustomerCriteriaPaginated:
allOf:
- $ref: "#/components/schemas/Page"
- x-business-entity-paginated: "CustomerCriteria"
- properties:
content:
type: "array"
items:
$ref: "#/components/schemas/CustomerCriteria"
OrderStatus:
type: "string"
x-business-entity: "OrderStatus"
enum:
- "DELIVERED"
- "CONFIRMED"
- "SHIPPED"
Page:
type: object
required:
- "content"
- "totalElements"
- "totalPages"
- "size"
- "number"
properties:
number:
type: integer
minimum: 0
numberOfElements:
type: integer
minimum: 0
size:
type: integer
minimum: 0
maximum: 200
multipleOf: 25
totalElements:
type: integer
totalPages:
type: integer
parameters:
page:
name: page
in: query
description: The number of results page
schema:
type: integer
format: int32
default: 0
limit:
name: limit
in: query
description: The number of results in a single page
schema:
type: integer
format: int32
default: 20
sort:
name: sort
in: query
description: The number of results page
schema:
type: array
items:
type: string