Skip to content

Fix model generator for snake case on dart-jaguar client generator#1076

Merged
wing328 merged 1 commit intoOpenAPITools:masterfrom
jaumard:bugfix/dart_jaguar_snakecase
Sep 25, 2018
Merged

Fix model generator for snake case on dart-jaguar client generator#1076
wing328 merged 1 commit intoOpenAPITools:masterfrom
jaumard:bugfix/dart_jaguar_snakecase

Conversation

@jaumard
Copy link
Copy Markdown
Contributor

@jaumard jaumard commented Sep 21, 2018

No description provided.

@jaumard jaumard changed the title fix model generator for snake case open api definition fix model generator for snake case open api definition on dart-jaguar Sep 21, 2018
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jaumard thanks for the PR. I would suggest using {{{baseName}}} as {{baseName}} may escape special characters in HTML.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But here we want them to be escaped anyway. It's should be plain text only as it's the name of the JSON field

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jaumard We've encountered some edge cases before (e.g. JSON key is "student"). I don't think these occur very often but still prefer using {{{baseName}}} to make it consistent with other generators.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem :) it's done ^^

@wing328
Copy link
Copy Markdown
Member

wing328 commented Sep 24, 2018

cc @ircecho (2017/07) @swipesight (2018/09) @jaumard (2018/09)

Do we need a similar fix in the dart client generator? I see any reference to "Alias" in the samples at the moment:

$ grep -R Alias samples/client/petstore/dart/*
$ grep -R Alias samples/client/petstore/dart2/*

@jaumard
Copy link
Copy Markdown
Contributor Author

jaumard commented Sep 24, 2018

@wing328 @Alias is specific to jaguar for the serialization so I'll say it's not needed for other dart generator

@wing328
Copy link
Copy Markdown
Member

wing328 commented Sep 24, 2018

@jaumard ah ok. Thanks for the explanation.

@jaumard jaumard force-pushed the bugfix/dart_jaguar_snakecase branch from 68afe75 to 1ec9654 Compare September 24, 2018 14:45
@wing328 wing328 merged commit df61cd9 into OpenAPITools:master Sep 25, 2018
A-Joshi pushed a commit to ihsmarkitoss/openapi-generator that referenced this pull request Feb 27, 2019
@wing328 wing328 changed the title fix model generator for snake case open api definition on dart-jaguar Fix model generator for snake case on dart-jaguar client generator Mar 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants