diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..271ef01 Binary files /dev/null and b/.DS_Store differ diff --git a/swagger.json b/swagger.json new file mode 100644 index 0000000..b701228 --- /dev/null +++ b/swagger.json @@ -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" + } + ] +} \ No newline at end of file diff --git a/swagger.yaml b/swagger.yaml new file mode 100644 index 0000000..43b08cc --- /dev/null +++ b/swagger.yaml @@ -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'