-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswagger.yml
73 lines (73 loc) · 1.58 KB
/
swagger.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
basePath: /
consumes:
- application/json
definitions:
Product:
description: Product defines the structure for the API request
properties:
description:
type: string
x-go-name: Description
id:
description: the id for this user
format: int64
minimum: 1
type: integer
x-go-name: ID
name:
type: string
x-go-name: Name
price:
format: float
type: number
x-go-name: Price
sku:
type: string
x-go-name: SKU
required:
- id
type: object
x-go-package: github.com/invad0r/building-microservices-with-go/handlers/data
info:
description: Documentation for Product API
title: Product API
version: 1.0.0
paths:
/products:
get:
description: Returns a list of products
operationId: listProducts
responses:
"200":
$ref: '#/responses/productsResponse'
tags:
- products
/products/{id}:
delete:
description: Returns a list of products
operationId: deleteProduct
parameters:
- description: The id of the product to delete fromt he database
format: int64
in: path
name: ID
required: true
type: integer
responses:
"201":
$ref: '#/responses/noContent'
tags:
- products
produces:
- application/json
responses:
noContent: {}
productsResponse:
description: A list of products return in the response
schema:
items:
$ref: '#/definitions/Product'
type: array
schemes:
- http
swagger: "2.0"