-
Notifications
You must be signed in to change notification settings - Fork 54
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
Fix/map additional properties ref #153
Fix/map additional properties ref #153
Conversation
@@ -158,6 +158,7 @@ extension UniversalTypeX on UniversalType { | |||
if (nullable || (!isRequired && defaultValue == null)) { | |||
sb.write('?'); | |||
} | |||
print(sb.toString()); |
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.
Remove print
@@ -487,6 +487,7 @@ void main() { | |||
description: 'data', | |||
jsonKey: 'data', | |||
isRequired: false, | |||
mapType: 'string', |
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.
Write a separate test for this if it's not difficult
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.
I added my json sample and wrote a test for swagger v2 additional properties
This pull request solves an issue with generating maps. I have this json swagger v2: restapi.json which has a
WrapperClass
. As a propertyWrapperClass
has aMap<String, ValueClass>
, which is defined with this syntax. What was previosly generated was:while the correct generated code is