Skip to content

Instantly share code, notes, and snippets.

@amakhrov
Last active January 28, 2020 01:51
Show Gist options
  • Save amakhrov/7967679d2945ba1daf30a2313afd69df to your computer and use it in GitHub Desktop.
Save amakhrov/7967679d2945ba1daf30a2313afd69df to your computer and use it in GitHub Desktop.
swagger: '2.0'
info:
version: '1.0'
title: Example API
schemes:
- http
paths:
/myendpoint1:
post:
summary: Posting inline model 1
parameters:
- name: data
in: body
schema:
type: object
properties:
name:
description: Name of object
type: string
responses:
200:
description: Response
schema:
$ref: '#/definitions/Response1'
/myendpoint2:
post:
summary: Posting inline model 2
parameters:
- name: data
in: body
schema:
type: object
properties:
tag:
description: Tag name
type: string
responses:
200:
description: Response
schema:
$ref: '#/definitions/Response1'
definitions:
Response1:
type: object
properties:
code:
description: Response code
type: string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment