Created
November 14, 2022 19:56
-
-
Save dbalatero/338d01031f475365ab49af31f00df5ca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"openapi": "3.0.0", | |
"info": { | |
"title": "Demo API", | |
"description": "The Demo API is not a real API.", | |
"version": "1.0.0" | |
}, | |
"paths": { | |
"/users": { | |
"post": { | |
"summary": "Create user", | |
"description": "Creates a user", | |
"operationId": "postUsers", | |
"requestBody": { | |
"required": true, | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"required": [ | |
"name" | |
], | |
"properties": { | |
"name": { | |
"type": "string", | |
"description": "The user's first + last name" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "string", | |
"description": "The created user's ID" | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"components": { | |
"schemas": { | |
"country": { | |
"type": "string", | |
"nullable": true, | |
"enum": [ | |
"foo", | |
"bar" | |
] | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment