Skip to content

Instantly share code, notes, and snippets.

@Markbnj
Created April 22, 2016 20:12
Show Gist options
  • Save Markbnj/ea3e7dff47f68c2c35953234d2037d02 to your computer and use it in GitHub Desktop.
Save Markbnj/ea3e7dff47f68c2c35953234d2037d02 to your computer and use it in GitHub Desktop.
paths:
/swagger:
get:
summary: Return swagger API specification
description: |
Returns the My Cars API spec as a json swagger doc.
tags:
- Meta
responses:
'200':
description: The My Cars API spec as a json swagger doc.
schema:
type: string
'500':
description: Unexpected error
schema:
$ref: '#/definitions/Error'
/postman:
get:
summary: Return postman collection for API endpoints
description: |
Returns a postman collection for endpoint testing in json format.
tags:
- Meta
responses:
'200':
description: The postman collection as a json object.
schema:
type: string
'500':
description: Unexpected error
schema:
$ref: '#/definitions/Error'
/cars:
get:
summary: List all (dream) cars
description: |
Returns a list of all currently owned (in my dreams) cars.
tags:
- Cars
responses:
'200':
description: An array of Car objects
schema:
$ref: '#/definitions/Cars'
'500':
description: Unexpected error
schema:
$ref: '#/definitions/Error'
post:
summary: Add a new (dream) car
description: |
Adds a new car to the database.
tags:
- Cars
parameters:
- name: car
schema:
$ref: '#/definitions/Car'
in: body
required: true
description: the new dream car
responses:
'200':
description: Succeeded
'500':
description: unexpected error
schema:
$ref: '#/definitions/Error'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment