Skip to content

fixed broken enum generation#199

Merged
deepmap-marcinr merged 2 commits intooapi-codegen:masterfrom
mgurevin:bug-illegal_enum_names
Jul 9, 2020
Merged

fixed broken enum generation#199
deepmap-marcinr merged 2 commits intooapi-codegen:masterfrom
mgurevin:bug-illegal_enum_names

Conversation

@mgurevin
Copy link
Copy Markdown
Contributor

@mgurevin mgurevin commented Jul 1, 2020

Generated enum codes couldn't compile even its definition is valid for OpenAPI. E.g.; (related 43d757f, #181)

openapi: 3.0.2

info:
  title: ...
  version: 0.0.0

paths:
  /foo:
    get:
      responses:
        200:
          description: ...
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Bar'

components:
  schemas:
    Bar:
      type: string
      enum: 
        - Foo
        - Bar
        - Foo Bar
        - Foo-Bar
        - 1Foo
        - Bar
        - ' Foo'
        - ' Foo '
        - _Foo_

@deepmap-marcinr deepmap-marcinr merged commit 8fcd3bb into oapi-codegen:master Jul 9, 2020
@mgurevin mgurevin deleted the bug-illegal_enum_names branch July 9, 2020 22:31
adrianpk pushed a commit to foorester/oapi-codegen that referenced this pull request Jan 16, 2024
* fixed broken enum generation

* removed unnecessary YAML parsing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants