Skip to content

Instantly share code, notes, and snippets.

@tamlyn
Created August 13, 2020 12:39
Show Gist options
  • Save tamlyn/b9ee89433bc0854740c7a6778510255d to your computer and use it in GitHub Desktop.
Save tamlyn/b9ee89433bc0854740c7a6778510255d to your computer and use it in GitHub Desktop.
openapi: 3.0.0
info:
title: Test case
version: "1"
paths:
/users:
get:
responses:
"200":
description: Get all the users
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/User"
post:
summary: Create a user
requestBody:
description: Pass in the RFQ properties to update. Only `product` is required.
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/User"
callbacks:
created:
/webhook:
post:
description: Called when the user is created
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/User"
responses:
"200":
description: OK
responses:
"202":
description: Accepted
components:
schemas:
User:
type: object
properties:
id:
type: string
description: Server-generated ID of the user
readOnly: true
name:
type: string
description: The name of the user
password:
type: string
description: Password of the user
format: password
writeOnly: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment