-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathswagger.yaml
More file actions
169 lines (169 loc) · 5.38 KB
/
Copy pathswagger.yaml
File metadata and controls
169 lines (169 loc) · 5.38 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
openapi: 3.0.1
info:
title: POC DevOps JAVA
description: The POC DevOps Java aims to be a proof of concept for the DevOps implementation on Java microservices buildt with Spring boot libraries.
termsOfService: https://www.more.info/about/termsAndConditions
contact:
name: support
url: https://www.more.info/about/
email: write@to.me
license:
name: MyLicense 1.0
url: https://www.more.info/about/license
version: 0.0.1
externalDocs:
description: SpringShop Wiki Documentation
url: https://springshop.wiki.github.org/docs
servers:
- url: http://localhost:8080
description: Generated server url
paths:
/scientist:
get:
tags:
- scientist-controller
summary: Retrieves all scientists.
operationId: get
responses:
'200':
description: OK
content:
'*/*':
schema:
$ref: '#/components/schemas/ScientistResponse'
'400':
description: 'The request is not valid.<table><tbody> <tr><td><center><strong>errorCode</strong></center></td><td><center><strong>errorMessage</strong></center></td></tr><tr><td><center>000.001</center></td><td><center>Invalid input: the field [${fieldName}] ${issue}</center></td></tr></tbody></table>'
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
post:
tags:
- scientist-controller
summary: Post a new scientist.
description: This is an API that adds a new scientist to the datasource.
operationId: post
parameters:
- name: myheader
in: header
required: false
schema:
type: string
- name: myParam
in: query
required: false
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Scientist'
required: true
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/ScientistResponse'
'400':
description: 'The request is not valid.<table><tbody> <tr><td><center><strong>errorCode</strong></center></td><td><center><strong>errorMessage</strong></center></td></tr><tr><td><center>000.001</center></td><td><center>Invalid input: the field [${fieldName}] ${issue}</center></td></tr></tbody></table>'
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
/scientist/{name}:
get:
tags:
- scientist-controller
summary: Retrieves the scientist with the requested name.
description: The name must be mapped with an available scientist.
operationId: get_1
parameters:
- name: name
in: path
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ScientistResponse'
'400':
description: 'The request is not valid.<table><tbody> <tr><td><center><strong>errorCode</strong></center></td><td><center><strong>errorMessage</strong></center></td></tr><tr><td><center>000.001</center></td><td><center>Invalid input: the field [${fieldName}] ${issue}</center></td></tr></tbody></table>'
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
components:
schemas:
Error:
required:
- errorCode
- errorMessage
type: object
properties:
field:
type: string
description: The name of the field involved in the validation.
example: name
errorCode:
type: string
description: Error code.
example: '000.001'
errorMessage:
type: string
description: Error message.
example: 'Invalid input: the field [name] must not be blank'
description: List of errors.
ErrorResponse:
required:
- errors
type: object
properties:
errors:
type: array
description: List of errors.
items:
$ref: '#/components/schemas/Error'
Scientist:
required:
- name
type: object
properties:
uuid:
type: string
description: Alphanumeric identifier associated to the scientist.
example: a123b4c5-de6f-7890-gh9i-j87k6lm5nop4
name:
type: string
description: Name of the scientist.
example: Marie Salomea Skłodowska Curie
numberOfNobels:
minimum: 0
type: integer
description: Number of Nobel prizes.
format: int64
example: 2
creationDate:
type: string
description: Creation date.
format: date-time
example: '1903-11-12T01:23:45.678Z'
updateDate:
type: string
description: Update date.
format: date-time
example: '1903-11-12T01:23:45.678Z'
ScientistResponse:
type: object
properties:
scientists:
type: array
description: List of scientists.
items:
$ref: '#/components/schemas/Scientist'