-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.yml
More file actions
101 lines (101 loc) · 2.02 KB
/
Copy pathopenapi.yml
File metadata and controls
101 lines (101 loc) · 2.02 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
---
openapi: 3.0.2
x-json-schema-faker:
locale: en
min-items: 2
max-items: 100
resolve-json-path: false
info:
title: Todo
version: 1.0.0
description: My Todo list API
contact:
url: "https://github.com/redhat-appdev-practice"
email: deven.phillips@redhat.com
license:
name: Apache 2.0
url: "https://www.apache.org/licenses/LICENSE-2.0"
servers:
- url: "http://{domain}:{port}{base_path}"
description: "Todo API URL"
variables:
base_path:
enum:
- /
- /api/v1
default: /
domain:
enum:
- localhost
- todo
- todo.example.com
default: localhost
port:
enum:
- '443'
- '80'
- '8080'
- '7080'
default: '7080'
tags:
- name: api
- name: todo
paths:
/todos:
get:
description: Get all todos
operationId: getAllTodos
tags:
- todo
responses:
'200':
description: 'OK'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Todo'
/health:
get:
operationId: getHealth
responses:
'200':
description: 'OK'
content:
text/plain:
schema:
type: string
components:
schemas:
NewTodo:
type: object
required:
- title
properties:
title:
type: string
x-faker: internet.username
maxLength: 255
description:
type: string
id:
type: string
format: uuid
due_date:
type: string
x-faker: date.future
format: date-time
nullable: true
completed:
type: string
x-faker: date.recent
format: date-time
nullable: true
Todo:
type: object
required:
- title
- id
allOf:
- $ref: '#/components/schemas/NewTodo'