From 5c0577aa8edc1a343c9b7d0dccdd8b381936e963 Mon Sep 17 00:00:00 2001 From: Bernardo Gomez Palacio Date: Tue, 14 Oct 2014 15:09:55 -0700 Subject: [PATCH] Adding Echo YAML Sample --- samples/yaml/echo.yaml | 51 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 samples/yaml/echo.yaml diff --git a/samples/yaml/echo.yaml b/samples/yaml/echo.yaml new file mode 100644 index 00000000000..ce60293f6ee --- /dev/null +++ b/samples/yaml/echo.yaml @@ -0,0 +1,51 @@ +swagger: 2 +info: + title: Echo API + description: Simple Rest Echo + version: "1.0.0" +host: "localhost:8002" +schemes: + - http +basePath: /v1 +produces: + - application/json +paths: + /echo: + get: + description: "Returns the 'message' to the caller" + operationId: "echo" + parameters: + #- name: X-header-param + - name: headerParam + in: header + type: string + required: false + - name: message + in: query + type: string + required: true + responses: + 200: + description: "Success" + schema: + $ref: EchoResponse + default: + description: "Error" + schema: + $ref: Error +definitions: + EchoResponse: + required: + - message + properties: + message: + type: string + Error: + properties: + code: + type: integer + format: int32 + message: + type: string + fields: + type: string