-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswagger.yaml
63 lines (61 loc) · 1.41 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
swagger: '2.0'
info:
version: 0.0.0
title: Sample API
paths:
/api/register:
post:
consumes:
- application/json
parameters:
- name: hoge_id
in: query
description: クエリパラメータ
type: integer
required: true
- in: body
name: user
description: The user to create.
schema:
$ref: '#/definitions/RegisterRequestBody'
responses:
200:
description: ok
404:
description: Data Not Found
/hello:
get:
produces:
- application/json
parameters:
- name: name
required: false
type: string
in: query
description: defaults to World if not given
operationId: getGreeting
responses:
200:
description: returns a greeting
schema:
$ref: "#/definitions/HelloResponse"
definitions:
RegisterRequestBody:
type: object
description: オブジェクトを別に定義してみるサンプル1
required:
- name
properties:
name:
type: string
firstName:
type: string
lastName:
type: string
HelloResponse: # テンプレート名
type: "object"
description: オブジェクトを別に定義してみるサンプル
properties:
name:
type: "string"
example: "john due"