Now you’ll add to the YAML file: a POST, PUT, and some responses.
{
"name": "Mellow jazz",
"songIds": [183, 13, 435, 98, 689]
}
definitions: # New play list newPlaylist: properties: name: type: string songIds: type: array items: type: integer required: - name
POST https://virtserver.swaggerhub.com/Orange-formation/musicAPI/1.0.0/playlist
{
"name": "Mellow jazz",
"songIds": [183, 13, 435, 98, 689]
}
# Create a new playlist post: # Body parameters: - name: newPlaylist in: body required: true schema: $ref: '#/definitions/newPlaylist' # Incomplete response (to finish later) responses: # Response code 200: description: Successful response