Skip to content

Instantly share code, notes, and snippets.

@grEvenX
Created July 26, 2018 06:45
Show Gist options
  • Save grEvenX/76d508f2933456894492c38410b1ac49 to your computer and use it in GitHub Desktop.
Save grEvenX/76d508f2933456894492c38410b1ac49 to your computer and use it in GitHub Desktop.
OpenAPI generator Swift 4 enum issue
openapi: "3.0.0"
info:
version: 1.0.0
title: Swagger Petstore
license:
name: MIT
servers:
- url: http://petstore.swagger.io/v1
paths:
/pets:
post:
description: Creates a new pet in the store. Duplicates are allowed
operationId: addPet
requestBody:
description: Pet to add to the store
content:
application/json:
schema:
$ref: '#/components/schemas/NewPet'
components:
schemas:
NewPet:
required:
- name
properties:
animal:
type: string
enum:
- dog
- cat
default: cat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment