Skip to content

Instantly share code, notes, and snippets.

@greggameplayer
Last active March 9, 2023 18:36
Show Gist options
  • Save greggameplayer/29c8d5cb13b8da859f3e63878a8f89d6 to your computer and use it in GitHub Desktop.
Save greggameplayer/29c8d5cb13b8da859f3e63878a8f89d6 to your computer and use it in GitHub Desktop.
openapi: 3.0.1
info:
title: KawaAPIMock
description: defaultDescription
version: '0.3'
paths:
/customers/{userId}:
post:
parameters:
- in: path
name: userId
schema:
type: integer
required: true
responses:
'200':
description: Auto generated using Swagger Inspector
content:
application/json:
schema:
type: object
properties:
createdAt:
type: string
firstName:
type: string
lastName:
type: string
address:
type: object
properties:
city:
type: string
postalCode:
type: integer
profile:
type: object
properties:
firstName:
type: string
lastName:
type: string
name:
type: string
company:
type: object
properties:
companyName:
type: string
orders:
type: array
items:
type: object
properties:
createdAt:
type: string
customerId:
type: integer
id:
type: integer
id:
type: integer
email:
type: string
username:
type: string
get:
description: Auto generated using Swagger Inspector
parameters:
- in: path
name: userId
schema:
type: integer
required: true
responses:
'200':
description: Auto generated using Swagger Inspector
content:
application/json:
schema:
type: object
properties:
createdAt:
type: string
firstName:
type: string
lastName:
type: string
address:
type: object
properties:
city:
type: string
postalCode:
type: integer
profile:
type: object
properties:
firstName:
type: string
lastName:
type: string
name:
type: string
company:
type: object
properties:
companyName:
type: string
orders:
type: array
items:
type: object
properties:
createdAt:
type: string
customerId:
type: integer
id:
type: integer
id:
type: integer
email:
type: string
username:
type: string
examples:
example1:
value:
createdAt: "2023-02-20T04:16:24.968Z"
name: "Jean Magie"
username: "theMagician"
firstName: "Jean"
lastName: "Magie"
address:
postalCode: 75001
city: "PARIS"
profile:
firstName: "Jean"
lastName: "Magie"
company:
companyName: "poudlardCompany"
id: 3
email: "jean.magie@gmail.com"
orders:
- createdAt: "2023-02-20T13:16:04.430Z"
id: 3
customerId: 3
- createdAt: "2023-02-20T00:49:24.786Z"
id: 53
customerId: 3
/customers/{userId}/orders:
get:
description: Auto generated using Swagger Inspector
parameters:
- in: path
name: userId
schema:
type: integer
required: true
responses:
'200':
description: Auto generated using Swagger Inspector
content:
application/json:
schema:
type: array
items:
type: object
required:
- createdAt
- id
- customerId
properties:
createdAt:
type: string
id:
type: integer
customerId:
type: integer
examples:
example1:
value:
- createdAt: "2023-02-20T13:16:04.430Z"
id: 3
customerId: 3
- createdAt: "2023-02-20T00:49:24.786Z"
id: 53
customerId: 3
/customers/{userId}/orders/{orderId}:
get:
description: Auto generated using Swagger Inspector
parameters:
- in: path
name: userId
schema:
type: integer
required: true
- in: path
name: orderId
schema:
type: integer
required: true
responses:
'200':
description: Auto generated using Swagger Inspector
content:
application/json:
schema:
type: object
properties:
createdAt:
type: string
customerId:
type: string
id:
type: string
examples:
example1:
value:
createdAt: "2023-02-20T13:16:04.430Z"
id: 3
customerId: 3
/customers/{userId}/orders/{orderId}/products:
get:
description: Auto generated using Swagger Inspector
parameters:
- in: path
name: userId
schema:
type: integer
required: true
- in: path
name: orderId
schema:
type: integer
required: true
responses:
'200':
description: Auto generated using Swagger Inspector
content:
application/json:
schema:
type: array
items:
type: object
required:
- createdAt
- name
- details
- stock
- id
- orderId
properties:
createdAt:
type: string
name:
type: string
details:
type: object
required:
- price
- description
- color
properties:
price:
type: number
description:
type: string
color:
type: string
stock:
type: integer
id:
type: integer
orderId:
type: integer
examples:
example1:
value:
- createdAt: "2023-02-20T02:07:21.849Z"
name: "Christopher Ankunding I"
details:
price: 172.00
description: "Andy shoes are designed to keeping in mind durability as well as trends, the most stylish range of shoes & sandals"
color: "yellow"
id: 3
orderId: 3
- createdAt: "2023-02-20T13:26:44.811Z"
name: "La baguette de jean magie"
details:
price: 150.00
description: "Une baguette hyper puissante"
color: "red"
id: 4
orderId: 4
/customers:
get:
description: Auto generated using Swagger Inspector
responses:
'200':
description: Auto generated using Swagger Inspector
content:
application/json:
schema:
type: array
items:
type: object
required:
- createdAt
- name
- username
- firstName
- lastName
- address
- profile
- company
- id
- email
- orders
properties:
createdAt:
type: string
name:
type: string
username:
type: string
firstName:
type: string
lastName:
type: string
address:
type: object
required:
- postalCode
- city
properties:
postalCode:
type: integer
city:
type: string
profile:
type: object
required:
- firstName
- lastName
properties:
firstName:
type: string
lastName:
type: string
company:
type: object
required:
- companyName
properties:
companyName:
type: string
id:
type: integer
email:
type: string
orders:
type: array
items:
type: object
required:
- createdAt
- id
- customerId
properties:
createdAt:
type: string
id:
type: integer
customerId:
type: integer
examples:
example1:
value:
- createdAt: "2023-02-20T04:16:24.968Z"
name: "Jean Magie"
username: "theMagician"
firstName: "Jean"
lastName: "Magie"
address:
postalCode: 75001
city: "PARIS"
profile:
firstName: "Jean"
lastName: "Magie"
company:
companyName: "poudlardCompany"
id: 3
email: "jean.magie@gmail.com"
orders:
- createdAt: "2023-02-20T13:16:04.430Z"
id: 3
customerId: 3
- createdAt: "2023-02-20T00:49:24.786Z"
id: 53
customerId: 3
- createdAt: "2023-02-22T04:16:24.968Z"
name: "Christophe Bigz"
username: "CBigz"
firstName: "Christophe"
lastName: "Bigz"
address:
postalCode: 75001
city: "PARIS"
profile:
firstName: "Christophe"
lastName: "Bigz"
company:
companyName: "Bigz&CO"
id: 4
email: "christophe.bigz@gmail.com"
orders:
- createdAt: "2023-02-20T13:16:04.430Z"
id: 4
customerId: 4
- createdAt: "2023-02-20T00:49:24.786Z"
id: 54
customerId: 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment