-
-
Notifications
You must be signed in to change notification settings - Fork 544
Create interfaces for additionalProperties objects #4
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
Conversation
fb6a7e8
to
f6d84ac
Compare
f6d84ac
to
47af2da
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems okay to me!
@@ -181,7 +198,7 @@ function parse(spec: Swagger2, namespace: string) { | |||
|
|||
output.push('}'); // Close namespace | |||
|
|||
return prettier.format(output.join('\n'), { parser: 'typescript' }); | |||
return prettier.format(output.join('\n'), { parser: 'typescript', singleQuote: true }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a note: I personally like singleQuote, but since we’re open-sourcing it I didn’t know the best thing to decide on. Maybe we could add options one day to allow customization of this, but this is fine for now (we can always change it if someone asks!)
@enmand are you able to add a test to |
|
||
expect(swaggerToTS(swagger)).toBe(ts); | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thank you!
This PR adds supports for object definitions with
additionalProperties: boolean | Swagger2Definition