-
Notifications
You must be signed in to change notification settings - Fork 0
/
hipster-products-oauth-devportal-spec.yaml
120 lines (113 loc) · 3.29 KB
/
hipster-products-oauth-devportal-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
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
openapi: 3.0.0
info:
title: Hipster Products API
version: "1"
description: Products API for Hipster Application
servers:
- url: https://apigeex.dlhdemo.com/oauth-hipster-products
security:
- GrantTypes:
- "openid"
- "profile"
- "offline_access"
- "customScope"
paths:
/products:
get:
operationId: GetProducts
responses:
"200":
description: A successful response.
content:
application/json:
schema:
$ref: "#/components/schemas/hipstershopListProductsResponse"
tags:
- ProductCatalogService
"/products/{productId}":
get:
operationId: GetProductDetails
parameters:
- in: path
name: productId
required: true
schema:
type: string
responses:
"200":
description: A successful response.
content:
application/json:
schema:
$ref: "#/components/schemas/hipstershopProduct"
tags:
- ProductCatalogService
components:
securitySchemes:
GrantTypes:
type: "oauth2"
description: "OAuth API"
flows:
authorizationCode:
authorizationUrl: "https://apigeex.dlhdemo.com/v1/oauth20/authorize"
tokenUrl: "https://apigeex.dlhdemo.com/v1/oauth20/token"
scopes:
offline_access: "offline_access"
profile: "profile"
openid: "openid"
clientCredentials:
tokenUrl: "https://apigeex.dlhdemo.com/oauth-cc-hipster/token"
scopes:
customScope: "Custom Scope"
schemas:
hipstershopListProductsResponse:
type: object
properties:
products:
type: array
items:
$ref: "#/components/schemas/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: "#/components/schemas/hipstershopMoney"
categories:
type: array
items:
type: string
description: >-
Categories such as "vintage" or "gardening" that can be used to look
up
other related products.