Skip to content

Instantly share code, notes, and snippets.

@norbertpotocki
Created March 30, 2016 23:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save norbertpotocki/ace6642e007ef252facc1b228da46478 to your computer and use it in GitHub Desktop.
Save norbertpotocki/ace6642e007ef252facc1b228da46478 to your computer and use it in GitHub Desktop.
API for a simple basket service
swagger: '2.0'
info:
title: BasketService API
version: "1.0.0"
host: api.myservice.com
schemes:
- https
basePath: /v1
produces:
- application/json
paths:
/basket:
get:
summary: List all available baskets
description: |
Sample API for basket retrieval.
responses:
200:
description: An array of baskets
schema:
type: array
items:
$ref: '#/definitions/Basket'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
definitions:
Basket:
type: object
properties:
id:
type: string
description: Unique identifier representing a specific basket.
Error:
type: object
properties:
code:
type: integer
format: int32
message:
type: string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment