-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathecho-api.yaml
74 lines (74 loc) · 2.13 KB
/
echo-api.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
---
swagger: '2.0'
info:
title: Demo Service
description: Demo Service for swagger
version: "1.0.0"
contact:
name: API Support
email: [email protected]
host: "localhost:8080"
schemes:
- http
produces:
- application/json
consumes:
- application/json
paths:
/:
get:
summary: Echoes back input
operationId: WhatDidISay
tags:
- EchoServer
description: |
Simply echoes back whatever the client passes in. Hopefully can be deployed without even needing a server.
parameters:
- name: iSaid
in: query
required: true
type: string
description: What the client has said, to be said back to it.
responses:
200:
description: Whatever the client said.
schema:
$ref: '#/definitions/ClientSaid'
headers:
Content-Type:
type: string
description: Always application/json.
415:
description: The content-type passed in couldn't be understood.
schema:
$ref: '#/definitions/BasicResponse'
headers:
Content-Type:
type: string
description: Always application/json.
x-amazon-apigateway-integration:
responses:
default:
statusCode: 200
responseParameters:
method.response.header.Content-Type: "'application/json'"
responseTemplates:
application/json: >
{
"clientSaid": "$util.escapeJavaScript($input.params('iSaid'))"
}
requestTemplates:
application/json: "{\"statusCode\":200}"
passthroughBehavior: "when_no_templates"
type: "mock"
definitions:
BasicResponse:
type: object
description: A basic response has no content and as such is just an empty JSON object. Inspect the HTTP status code to determine the result.
ClientSaid:
type: object
description: Whatever the client just said. Have you really not gotten that by now?
properties:
clientSaid:
type: string
description: Guess!