-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
swagger documentation for exchange endpoint
- Loading branch information
Mateus Pinheiro
authored and
Mateus Pinheiro
committed
Apr 4, 2023
1 parent
fc2d099
commit 16181ea
Showing
3 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{ | ||
"openapi": "3.0.0", | ||
"info": { | ||
"title": "Currency Exchange Rate - Documentation", | ||
"version": "0.1" | ||
}, | ||
"paths": { | ||
"/api/v1/exchange": { | ||
"get": { | ||
"tags": [ | ||
"Currency" | ||
], | ||
"summary": "Get the exchange rate for the given amount.", | ||
"operationId": "4fdc8759d6e6a162671dd80686b45619", | ||
"parameters": [ | ||
{ | ||
"name": "currency", | ||
"in": "path", | ||
"description": "The currency to exchange", | ||
"required": true, | ||
"schema": { | ||
"type": "string" | ||
} | ||
}, | ||
{ | ||
"name": "amount", | ||
"in": "path", | ||
"description": "The amount to exchange", | ||
"required": true, | ||
"schema": { | ||
"type": "float" | ||
} | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "OK" | ||
}, | ||
"422": { | ||
"description": "Unprocessable Entity" | ||
}, | ||
"500": { | ||
"description": "Internal server error" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"tags": [ | ||
{ | ||
"name": "Currency", | ||
"description": "Currency API endpoint" | ||
} | ||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
openapi: 3.0.0 | ||
info: | ||
title: 'Currency Exchange Rate - Documentation' | ||
version: '0.1' | ||
paths: | ||
/api/v1/exchange: | ||
get: | ||
tags: | ||
- Currency | ||
summary: 'Get the exchange rate for the given amount.' | ||
operationId: 4fdc8759d6e6a162671dd80686b45619 | ||
parameters: | ||
- | ||
name: currency | ||
in: path | ||
description: 'The currency to exchange' | ||
required: true | ||
schema: | ||
type: string | ||
- | ||
name: amount | ||
in: path | ||
description: 'The amount to exchange' | ||
required: true | ||
schema: | ||
type: float | ||
responses: | ||
'200': | ||
description: OK | ||
'422': | ||
description: 'Unprocessable Entity' | ||
'500': | ||
description: 'Internal server error' | ||
tags: | ||
- | ||
name: Currency | ||
description: 'Currency API endpoint' |