Skip to content

Instantly share code, notes, and snippets.

@winarcooo
Last active July 14, 2020 01:21
Show Gist options
  • Save winarcooo/74c23a9ff424a78a316b699264699c02 to your computer and use it in GitHub Desktop.
Save winarcooo/74c23a9ff424a78a316b699264699c02 to your computer and use it in GitHub Desktop.
[swagger udemy assignment 2] #udemy #online-courses
# every open API needs this
swagger: '2.0'
# document metadata
info:
version: "0.3.0"
title: Music API
# URL data
host: api.muzicplayz.com
basePath: /v3
schemes:
- https
# endpoints
paths:
#playlists
/playlist:
# get one or more playlists
get:
# Query parameters
parameters:
# Number to return
- name: limit
in: query
required: false
type: integer
# Number to skip
- name: offset
in: query
required: false
type: integer
# Search term
- name: search
in: query
required: false
type: string
responses:
# Response code
200:
description: Successful response
# Playlists
/playlist/{playlist-id}:
# Delete a playlist
delete:
# Path parameter
parameters:
# Playlist id
- name: playlist-id
in: path
required: true
type: string
# Incomplete response (to finish later)
responses:
# Response code
200:
description: Successful response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment