-
Notifications
You must be signed in to change notification settings - Fork 0
/
swagger.yaml
79 lines (79 loc) · 1.87 KB
/
swagger.yaml
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
swagger: "2.0"
info:
title: Fastify API
description: Building a blazing fast REST API with Node.js, MongoDB, Fastify and Swagger
version: 0.1.0
definitions:
Schema:
type: object
properties:
userSchemaRequest:
type: object
properties: &a1
id:
type: string
required:
- id
additionalProperties: false
userSchemaReply:
type: object
properties: &a2
id:
type: string
name:
type: string
required:
- id
- name
additionalProperties: false
userSchemaReplyArray:
type: array
items: &a3
$ref: "#/definitions/Schema/properties/userSchemaReply"
required:
- userSchemaRequest
- userSchemaReply
- userSchemaReplyArray
additionalProperties: false
paths:
/users:
get:
operationId: getAllUsers
description: Get all users
responses:
"200":
description: Default Response
schema:
$ref: "#/definitions/Schema/properties/userSchemaReplyArray"
"/users/{id}":
get:
operationId: getUser
description: Get a user by id
parameters:
- type: object
properties: *a1
required: true
additionalProperties: false
in: path
name: userSchemaRequest
- type: object
properties: *a2
required: true
additionalProperties: false
in: path
name: userSchemaReply
- type: array
items: *a3
required: true
in: path
name: userSchemaReplyArray
responses:
"200":
description: Default Response
schema:
$ref: "#/definitions/Schema/properties/userSchemaReply"
host: localhost
schemes:
- http
consumes:
- application/json