-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathswagger.yaml
More file actions
148 lines (138 loc) · 3.28 KB
/
swagger.yaml
File metadata and controls
148 lines (138 loc) · 3.28 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
swagger: "2.0"
info:
description: "APP - Jogador Web - Sistema desenvolvido ao longo da disciplina de TecWeb - UFSJ"
version: "1.0.0"
title: "Jogador Web"
termsOfService: "http://swagger.io/terms/"
contact:
email: "rhcsjdr@outlook.com"
license:
name: "Apache 2.0"
url: "http://www.apache.org/licenses/LICENSE-2.0.html"
host: "petstore.swagger.io"
basePath: "/v1"
tags:
- name: "jogadores"
description: "adicionar jogadores"
externalDocs:
description: "Find out more about our store"
url: "http://swagger.io"
schemes:
- "http"
paths:
/jogador:
post:
tags:
- "jogadores"
summary: "Adciona um novo jogador "
operationId: "addjogador"
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- in: "body"
name: "body"
description: "Objeto de jogadores a ser adcionado no sistema"
required: true
schema:
$ref: '#/definitions/Player'
responses:
200:
description: OK
schema:
$ref: '#/definitions/Player'
/jogador/{playerId}:
get:
tags:
- "jogadores"
summary: "Busca jogador pelo ID"
operationId: "getPlayerById"
produces:
- "application/json"
parameters:
- name: "playerId"
in: "path"
description: "ID of jogador to return"
required: true
type: "integer"
format: "int64"
responses:
200:
description: "Sucesso"
schema:
$ref: "#/definitions/Player"
400:
description: "Not Fund ID Invalido"
404:
description: "Not Acess"
put:
tags:
- "jogadores"
summary: "Atualizar um jogador no sistema"
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- name: "playerId"
in: "path"
description: "ID that need to be updated"
required: true
type: "integer"
format: "int64"
- name: "body"
in: "body"
description: "Updated jogador object "
schema:
$ref: '#/definitions/Player'
responses:
200:
description: "Sucesso"
schema:
$ref: '#/definitions/Player'
400:
description: "Not Acess"
404:
description: "Not Fund ID Invalido"
delete:
tags:
- "jogadores"
summary: "Remove um jogador"
operationId: "deletejogador"
produces:
- "application/json"
parameters:
- name: "playerId"
in: "path"
description: "Bike ID to delete"
required: true
type: "integer"
format: "int64"
responses:
200:
description: "Successful Operation"
schema:
$ref: '#/definitions/Player'
400:
description: "Not Acess ID Invalido"
404:
description: "Not Fund"
definitions:
Player:
type: "object"
properties:
id:
type: "integer"
format: "int64"
nome:
type: "string"
sobrenome:
type: "string"
time:
type: "string"
posicao:
type: "string"
idade:
type: "integer"
format: "int64"