Skip to content

Instantly share code, notes, and snippets.

@youyo
Last active August 6, 2019 23:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save youyo/22ff4ac7d6f52541af1822202e1c9d7d to your computer and use it in GitHub Desktop.
Save youyo/22ff4ac7d6f52541af1822202e1c9d7d to your computer and use it in GitHub Desktop.
swagger: '2.0'
info:
title: swagger_sample
host: 127.0.0.1:3000
schemes:
- https
- http
x-amazon-apigateway-request-validators:
all:
validateRequestBody: true
validateRequestParameters: true
paths:
/swagger/sample:
post:
summary: swagger sample
x-amazon-apigateway-request-validator: all
x-amazon-apigateway-integration:
httpMethod: POST
type: aws_proxy
uri:
Fn::Sub: arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${Function.Arn}/invocations
responses:
200:
description: ok
schema:
$ref: '#/definitions/NoContent'
parameters:
- in: body
name: swagger_sample
required: true
schema:
$ref: '#/definitions/swagger_sample'
definitions:
swagger_sample:
type: object
properties:
uuid:
type: string
minLength: 36
maxLength: 36
format: uuid
count:
type: array
items:
type: integer
minimum: 0
maximum: 100
required:
- uuid
- count
NoContent:
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment