-
Notifications
You must be signed in to change notification settings - Fork 61
/
openapi-docs.yml
58 lines (58 loc) · 1.17 KB
/
openapi-docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
openapi: 3.0.0
info:
version: 1.0.0
title: My API
description: This is the API
servers:
- url: v1
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
schemas:
UserId:
type: string
example: '1212121'
User:
type: object
properties:
id:
type: string
example: '1212121'
name:
type: string
example: John Doe
age:
type: number
example: 42
required:
- id
- name
- age
parameters:
UserId:
schema:
$ref: '#/components/schemas/UserId'
required: true
name: id
in: path
paths:
'/users/{id}':
get:
description: Get user data by its id
summary: Get a single user
security:
- bearerAuth: []
parameters:
- $ref: '#/components/parameters/UserId'
responses:
'200':
description: Object with user data.
content:
application/json:
schema:
$ref: '#/components/schemas/User'
'204':
description: No content - successful operation