swagger: "2.0" info: description: "This is a sample server go-swap-server. You can find out more about information at [https://github.com/me-io/go-swap](https://github.com/me-io/go-swap)" version: "1.0.0" title: "Go-Swap-Server" termsOfService: "https://github.com/me-io/go-swap" contact: email: "meabed@me.io" license: name: "MIT" url: "https://github.com/me-io/go-swap/blob/master/LICENSE.md" tags: - name: "Currency" description: "Swap & Convert between Currencies" externalDocs: description: "Find out more" url: "https://github.com/me-io/go-swap" schemes: - "https" - "http" paths: /convert: post: tags: - "Currency" summary: "Request Currency Conversion Rate & Value" description: "" operationId: "ConvertCurrency" consumes: - "application/json" produces: - "application/json" parameters: - in: "body" name: "body" description: "Currency Conversion Request" required: true schema: $ref: "#/definitions/ConvertRequest" responses: 200: description: "successful operation" schema: $ref: "#/definitions/ConvertResponse" 405: description: "Invalid input" 400: description: "Invalid input" 404: description: "Invalid input" definitions: ConvertResponse: type: "object" properties: from: type: "string" example: "USD" to: type: "string" example: "AED" value: type: "number" format: "float" example: 3.6727 amount: type: "number" format: "float" example: 16.5272 dateTime: type: "string" example: "2018-09-25T12:17:17Z" exchangerName: type: "string" example: "google" ConvertRequest: type: "object" required: - "amount" - "from" - "to" - "exchanger" properties: amount: type: "number" format: "float" example: 1.54 from: type: "string" example: "USD" to: type: "string" example: "AED" decimalPoints: type: "integer" example: 4 exchanger: type: "array" minItems: 1 maxItems: 10 items: type: "object" required: - "name" properties: name: type: "string" example: "google" apiKey: type: "string" example: "demo_api_key_2018" userAgent: type: "string" example: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:21.0) Gecko/20100101 Firefox/21.0" cacheTime: type: "string" example: "60s" externalDocs: description: "Find out more about Go-Swap-Server" url: "https://github.com/me-io/go-swap"