Created
September 4, 2015 00:30
-
-
Save prb112/59b9cb4ad3d2df19911c to your computer and use it in GitHub Desktop.
Example of a Swagger Enumeration in YAML
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
#YAML Demonstration | |
swagger: '2.0' | |
info: | |
title: Demonstration of Swagger Yaml with Enumeration | |
description: Simple Demonstration of Enumeration | |
version: "1.0.0" | |
host: api.bastide.org | |
schemes: | |
- https | |
basePath: /1 | |
produces: | |
- application/atom+xml | |
paths: | |
/demo: | |
get: | |
summary: demonstration for enumeration | |
description: | | |
Demonstrates an enumeration | |
parameters: | |
- name: day | |
in: query | |
description: day of the week | |
required: true | |
type: string | |
enum: | |
- Monday | |
- Tuesday | |
- Wednesday | |
- Thursday | |
- Friday | |
- Saturday | |
- Sunday | |
responses: | |
200: | |
description: The response upon succesful query | |
default: | |
description: Error occured |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
how to define enum, just like this (int, string)