Last active
April 18, 2023 17:29
-
-
Save rvennam/063f8f6a5cae6b538a5eddb91ea64298 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: '3.0.0' | |
info: | |
version: '1.0.0' | |
title: 'Currencies API' | |
description: International currency support | |
servers: | |
- url: https://currency.solo.io:443/ | |
description: Solo.io Currency server API | |
- url: http://localhost:8080/ | |
description: Local development | |
paths: | |
/currencies: | |
get: | |
summary: Get supported currencies | |
responses: | |
'200': | |
description: Supported currencies | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/GetSupportedCurrenciesResponse' | |
/currencies/convert: | |
post: | |
requestBody: | |
description: Currency to convert | |
required: true | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/CurrencyConversionRequest' | |
summary: Convert one currency to another | |
responses: | |
'200': | |
description: Converted currency | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Money' | |
components: | |
schemas: | |
GetSupportedCurrenciesResponse: | |
properties: | |
currency_codes: | |
description: The 3-letter currency code defined in ISO 4217. | |
items: | |
type: string | |
type: array | |
type: object | |
CurrencyConversionRequest: | |
properties: | |
from: | |
properties: | |
currency_code: | |
description: The 3-letter currency code defined in ISO 4217. | |
type: string | |
nanos: | |
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.' | |
format: int32 | |
type: integer | |
units: | |
description: 'The whole units of the amount. For example if `currency_code` is `"USD"`, then 1 unit is one US dollar.' | |
format: int64 | |
type: integer | |
x-kubernetes-int-or-string: true | |
type: object | |
to_code: | |
description: The 3-letter currency code defined in ISO 4217. | |
type: string | |
type: object | |
Money: | |
properties: | |
currency_code: | |
description: The 3-letter currency code defined in ISO 4217. | |
type: string | |
nanos: | |
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.' | |
format: int32 | |
type: integer | |
units: | |
description: 'The whole units of the amount. For example if `currency_code` is `"USD"`, then 1 unit is one US dollar.' | |
format: int64 | |
type: integer | |
x-kubernetes-int-or-string: true | |
type: object |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment