| 1 | --- |
| 2 | basePath: "/colors_template_yaml" |
| 3 | definitions: |
| 4 | Color: |
| 5 | type: string |
| 6 | Palette: |
| 7 | properties: |
| 8 | palette_name: |
| 9 | items: |
| 10 | "$ref": "#/definitions/Color" |
| 11 | type: array |
| 12 | type: object |
| 13 | info: |
| 14 | description: powered by Flasgger and YAML template |
| 15 | termsOfService: "/tos" |
| 16 | title: Colors API |
| 17 | version: 0.0.1 |
| 18 | paths: |
| 19 | "/colors/{palette}/": |
| 20 | get: |
| 21 | consumes: |
| 22 | - application/json |
| 23 | description: This is overrriden |
| 24 | externalDocs: |
| 25 | description: Project repository |
| 26 | url: http://github.com/rochacbruno/flasgger |
| 27 | operationId: get_colors |
| 28 | parameters: |
| 29 | - default: all |
| 30 | description: Which palette to filter? |
| 31 | enum: |
| 32 | - all |
| 33 | - rgb |
| 34 | - cmyk |
| 35 | in: path |
| 36 | name: palette |
| 37 | required: true |
| 38 | type: string |
| 39 | produces: |
| 40 | - application/json |
| 41 | responses: |
| 42 | 200: |
| 43 | description: A list of colors (may be filtered by palette) |
| 44 | examples: |
| 45 | rgb: |
| 46 | - red |
| 47 | - green |
| 48 | - blue |
| 49 | schema: |
| 50 | "$ref": "#/definitions/Palette" |
| 51 | schemes: |
| 52 | - http |
| 53 | - https |
| 54 | security: |
| 55 | colors_auth: |
| 56 | - write:colors |
| 57 | - read:colors |
| 58 | summary: Example using a dictionary as specification |
| 59 | tags: |
| 60 | - colors |
| 61 | swagger: '2.0' |