Skip to content

Instantly share code, notes, and snippets.

@coco98
Last active April 24, 2018 09:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coco98/a12c860058b0af81771baa357d1b0247 to your computer and use it in GitHub Desktop.
Save coco98/a12c860058b0af81771baa357d1b0247 to your computer and use it in GitHub Desktop.
#An array of artists are returned by a GET query to /v1/artists
# artists = [
# {
# "name": "...",
# "genre": "...",
# "albums_recorded": <int>,
# "username": "..."
# }
# ]
#
swagger: '2.0'
info:
version: 1.0.0
title: Simple Artist API
description: A simple API to understand the Swagger Specification in greater detail
host: example.io
basePath: /v1
paths:
/artists:
get:
description: Returns a list of artists
# ----- Added lines ----------------------------------------
responses:
200:
description: Successfully returned a list of artists
schema:
type: array
items:
type: object
required:
- username
properties:
name:
type: string
genre:
type: string
albums_recorded:
type: integer
username:
type: string
400:
description: Invalid request
schema:
type: object
properties:
message:
type: string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment