Skip to content
This repository has been archived by the owner on Nov 11, 2023. It is now read-only.

Empty schemas generate invalid code #209

Closed
seanlaff opened this issue Jan 11, 2020 · 0 comments · Fixed by #210
Closed

Empty schemas generate invalid code #209

seanlaff opened this issue Jan 11, 2020 · 0 comments · Fixed by #210

Comments

@seanlaff
Copy link
Contributor

responses:
        "204":
          description: pet deleted
          content:
            application/json:
              schema:
                properties: {}

Will generated a type that looks like

export interface PetDeleteResponse {
;
}

The getObject() function builds an array, joins it with ;\n, and then appends ;. The bug being that the trailing ; gets appended even if the array was empty.

seanlaff added a commit to seanlaff/restful-react that referenced this issue Jan 11, 2020
seanlaff added a commit to seanlaff/restful-react that referenced this issue Jan 11, 2020
fabien0102 pushed a commit that referenced this issue Jan 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant