Skip to content

Commit

Permalink
swagger documentation for exchange endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Mateus Pinheiro authored and Mateus Pinheiro committed Apr 4, 2023
1 parent fc2d099 commit 16181ea
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 0 deletions.
Binary file added .DS_Store
Binary file not shown.
55 changes: 55 additions & 0 deletions swagger.json
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"
}
]
}
37 changes: 37 additions & 0 deletions swagger.yaml
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'

0 comments on commit 16181ea

Please sign in to comment.