-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi_spec_test.yaml
More file actions
70 lines (70 loc) · 1.44 KB
/
api_spec_test.yaml
File metadata and controls
70 lines (70 loc) · 1.44 KB
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
swagger: '2.0'
info:
version: 1.0.0
title: Test API
description: ''
servers: null
host: api.example.com
basePath: /
schemes:
- http
paths:
'/stock/v1/stocks/{id}':
get:
produces:
- application/json
parameters:
- name: id
in: path
required: true
type: integer
format: int64
description: 在庫商品ID
responses:
'200':
description: 在庫商品の情報
schema:
$ref: '#/definitions/Stock'
examples:
application/json: |-
{
"id": 0,
"customer_name": "customer_name",
"detail": {
"detail_type": "Watch",
"entity": {"name": "name-val", "weight": 10}
},
"barcode": 6
}
definitions:
Stock:
type: object
properties:
id:
type: integer
format: int64
barcode:
type: integer
customer_name:
type: string
detail:
$ref: '#/definitions/StockDetailContainer'
Watch:
type: object
properties:
name:
type: string
weight:
type: integer
Diamond:
type: object
properties:
name:
type: string
carat:
type: integer
StockDetailContainer: # swift clientは手で実装
type: object
properties:
detail_type:
type: string