-
Notifications
You must be signed in to change notification settings - Fork 0
/
hipster-products-import-spec.yaml
90 lines (89 loc) · 2.42 KB
/
hipster-products-import-spec.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
swagger: '2.0'
info:
title: Hipster Products API
version: "1"
description: Products API for Hipster Application
host: cloud.hipster.s.apigee.com
schemes:
- http
consumes:
- application/json
produces:
- application/json
paths:
/products:
get:
operationId: GetProducts
responses:
'200':
description: A successful response.
schema:
$ref: '#/definitions/hipstershopListProductsResponse'
tags:
- ProductCatalogService
/products/{productId}:
get:
operationId: GetProductDetails
parameters:
- in: path
name: productId
type: string
required: true
responses:
'200':
description: A successful response.
schema:
$ref: '#/definitions/hipstershopProduct'
tags:
- ProductCatalogService
definitions:
hipstershopListProductsResponse:
type: object
properties:
products:
type: array
items:
$ref: '#/definitions/hipstershopProduct'
hipstershopMoney:
type: object
properties:
currency_code:
type: string
description: The 3-letter currency code defined in ISO 4217.
units:
type: string
format: int64
description: |-
The whole units of the amount.
For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
nanos:
type: integer
format: int32
description: |-
Number of nano (10^-9) units of the amount.
The value must be between -999,999,999 and +999,999,999 inclusive.
If `units` is positive, `nanos` must be positive or zero.
If `units` is zero, `nanos` can be positive, zero, or negative.
If `units` is negative, `nanos` must be negative or zero.
For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
description: Represents an amount of money with its currency type.
hipstershopProduct:
type: object
properties:
id:
type: string
name:
type: string
description:
type: string
picture:
type: string
price_usd:
$ref: '#/definitions/hipstershopMoney'
categories:
type: array
items:
type: string
description: |-
Categories such as "vintage" or "gardening" that can be used to look up
other related products.