swagger: "2.0"
info:
description: "This is a demo description for generated enums
version: "1.0"
title: "Enum Demo"
definitions:
colors:
description: Eine Auswahl von Farben
type: object
enum:
- $ref: '#/definitions/Red'
- $ref: '#/definitions/Blue'
- $ref: '#/definitions/Green'
Color:
type: object
description: General color object
properties:
red:
type: integer
green:
type: integer
blue:
type: integer
Red:
allOf:
- $ref: '#/definitions/Color'
description: 'red = 255, green = 0, blue = 0'
Green:
allOf:
- $ref: '#/definitions/Color'
description: 'red = 0, green = 255, blue = 0'
Blue:
allOf:
- $ref: '#/definitions/Color'
description: 'red = 0, green = 0, blue = 255'
Buble:
type: object
description: Demo object with the wished enum
properties:
color:
$ref: '#/definitions/colors'