File tree Expand file tree Collapse file tree 1 file changed +115
-0
lines changed
Expand file tree Collapse file tree 1 file changed +115
-0
lines changed Original file line number Diff line number Diff line change 1+ openapi : 3.0.0
2+ info :
3+ title : API de Produtos
4+ version : 1.0.0
5+ paths :
6+ /health :
7+ get :
8+ summary : Verificar status da aplicação
9+ responses :
10+ ' 200 ' :
11+ description : Status da aplicação
12+ content :
13+ application/json :
14+ schema :
15+ type : object
16+ properties :
17+ status :
18+ type : string
19+ /products :
20+ get :
21+ summary : Listar todos os produtos
22+ responses :
23+ ' 200 ' :
24+ description : Lista de produtos
25+ content :
26+ application/json :
27+ schema :
28+ type : array
29+ items :
30+ $ref : ' #/components/schemas/Product'
31+ post :
32+ summary : Criar produto
33+ requestBody :
34+ required : true
35+ content :
36+ application/json :
37+ schema :
38+ $ref : ' #/components/schemas/ProductInput'
39+ responses :
40+ ' 201 ' :
41+ description : Produto criado
42+ content :
43+ application/json :
44+ schema :
45+ $ref : ' #/components/schemas/Product'
46+ /products/{id} :
47+ get :
48+ summary : Buscar produto específico
49+ parameters :
50+ - name : id
51+ in : path
52+ required : true
53+ schema :
54+ type : string
55+ responses :
56+ ' 200 ' :
57+ description : Informações do produto
58+ content :
59+ application/json :
60+ schema :
61+ $ref : ' #/components/schemas/Product'
62+ put :
63+ summary : Atualizar produto
64+ parameters :
65+ - name : id
66+ in : path
67+ required : true
68+ schema :
69+ type : string
70+ requestBody :
71+ required : true
72+ content :
73+ application/json :
74+ schema :
75+ $ref : ' #/components/schemas/ProductInput'
76+ responses :
77+ ' 200 ' :
78+ description : Produto atualizado
79+ content :
80+ application/json :
81+ schema :
82+ $ref : ' #/components/schemas/Product'
83+ delete :
84+ summary : Deletar produto
85+ parameters :
86+ - name : id
87+ in : path
88+ required : true
89+ schema :
90+ type : string
91+ responses :
92+ ' 204 ' :
93+ description : Produto deletado
94+ components :
95+ schemas :
96+ Product :
97+ type : object
98+ properties :
99+ id :
100+ type : string
101+ nome :
102+ type : string
103+ preço :
104+ type : number
105+ descrição :
106+ type : string
107+ ProductInput :
108+ type : object
109+ properties :
110+ nome :
111+ type : string
112+ preço :
113+ type : number
114+ descrição :
115+ type : string
You can’t perform that action at this time.
0 commit comments