Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaks when there are spaces in models names #66

Closed
typeofweb opened this issue Sep 19, 2019 · 1 comment · Fixed by #75
Closed

Breaks when there are spaces in models names #66

typeofweb opened this issue Sep 19, 2019 · 1 comment · Fixed by #75

Comments

@typeofweb
Copy link
Contributor

My swagger.json is autogenerated and some of the models are "placeholder models" for irrelevant responses. By default, they contain spaces in their names i.e. "Model 1", "Model 2" etc.
Unfortunately, currently this is not handled by swagger-to-ts and the following error is thrown:

'{' expected. (2:24)
  1 | declare namespace OpenAPI {
> 2 | export interface Model 99 {

Suggested solution would be to replace spaces with _ or similar symbol.

@typeofweb typeofweb changed the title Break when there are spaces in models names Breaks when there are spaces in models names Sep 19, 2019
@drwpow
Copy link
Contributor

drwpow commented Oct 1, 2019

Ah good find @mmiszy! Could you give me a small snippet of your Swagger Schema with spaces so I can see it in context? Then I can push a fix.

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 a pull request may close this issue.

2 participants