Last active
April 24, 2018 09:09
-
-
Save coco98/a12c860058b0af81771baa357d1b0247 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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