-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswagger.yaml
140 lines (137 loc) · 4.14 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
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
swagger: "2.0"
info:
description: "六法を JSON 形式で取得できるAPI"
version: "1.0.0"
title: "六法JSON"
contact:
email: "[email protected]"
license:
name: "Apache 2.0"
url: "http://www.apache.org/licenses/LICENSE-2.0.html"
host: "api.roppo-json.dev"
basePath: "/v1"
tags:
- name: "憲法"
description: "Constitution"
- name: "刑法"
description: "Penal Code"
- name: "刑事訴訟法"
description: "Criminal Procedure"
- name: "民法"
description: "Civil Code"
- name: "民事訴訟法"
description: "Civil Procedure"
- name: "商法"
description: "Commercial Code"
schemes:
- "https"
paths:
/constitution:
get:
tags:
- "憲法"
summary: "憲法の全文取得"
produces:
- "application/json"
responses:
200:
description: "OK"
schema:
type: "array"
items:
$ref: "#/definitions/Provision"
/constitution/{low_number}:
get:
tags:
- "憲法"
summary: "指定した条番号の条文を取得する"
parameters:
- name: "low_number"
in: "path"
type: "integer"
description: "条番号(日本国憲法第n条)"
required: true
responses:
200:
description: "OK"
schema:
$ref: "#/definitions/Provision"
deprecated: false
/constitution/{low_number}/{term_number}:
get:
tags:
- "憲法"
summary: "指定した条番号の条文を取得する"
parameters:
- name: "low_number"
in: "path"
type: "integer"
description: "条番号(日本国憲法第n条)"
required: true
- name: "term_number"
in: "path"
type: "integer"
description: "項番号(日本国憲法第a条b項)"
required: true
responses:
200:
description: "OK"
schema:
type: "object"
properties:
title:
type: "string"
example: "第1項"
sentence:
type: "string"
example: "天皇は、この憲法の定める国事に関する行為のみを行ひ、国政に関する権能を有しない。"
404:
description: "Not Found"
schema:
$ref: "#/definitions/TermNotFoundError"
deprecated: false
definitions:
Provision:
type: "object"
properties:
title:
type: string
example: "第七条"
terms:
type: "array"
items:
type: object
properties:
title:
type: string
example: null
sentence:
type: string
example: "天皇は、この憲法の定める国事に関する行為のみを行ひ、国政に関する権能を有しない。"
examples:
type: "array"
items:
type: string
example:
- "憲法改正、法律、政令及び条約を公布すること。"
- "国会を召集すること。"
- "衆議院を解散すること。"
- "国会議員の総選挙の施行を公示すること。"
- "国務大臣及び法律の定めるその他の官吏の任免並びに全権委任状及び大使及び公使の信任状を認証すること。"
- "大赦、特赦、減刑、刑の執行の免除及び復権を認証すること。"
- "栄典を授与すること。"
- "批准書及び法律の定めるその他の外交文書を認証すること。"
- "外国の大使及び公使を接受すること。"
- "儀式を行ふこと。"
TermNotFoundError:
type: "object"
properties:
error:
type: "object"
properties:
status:
type: 'integer'
example: 404
message:
type: 'string'
example: '日本国憲法 第2条 第3項 は見つかりませんでした。'