Created
July 13, 2023 12:59
-
-
Save TimonVS/8c415b86347d370454edb6c873fe32ad 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: Sample API | |
version: 1.0.0 | |
servers: | |
- url: http://api.example.com/v1 | |
paths: | |
/users: | |
get: | |
summary: Returns a list of users. | |
responses: | |
'200': # status code | |
content: | |
application/json: | |
schema: | |
type: array | |
items: | |
$ref: '#/components/schemas/User' | |
/users/{id}: | |
get: | |
summary: Returns a user. | |
parameters: | |
- name: id | |
in: path | |
required: true | |
schema: | |
type: integer | |
description: The user ID. | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/User' | |
components: | |
schemas: | |
User: | |
type: object | |
properties: | |
id: | |
type: integer | |
name: | |
type: string |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment