Skip to content

Conversation

@manuelgomes2
Copy link
Contributor

@manuelgomes2 manuelgomes2 commented May 19, 2018

… Dart language options.

PR checklist

  • Read the contribution guidelines.
  • Ran the shell script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh and ./bin/security/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in .\bin\windows\.
  • Filed the PR against the correct branch: 3.0.0 branch for changes related to OpenAPI spec 3.0. Default: master.
  • Copied the technical committee to review the pull request if your PR is targeting a particular programming language.

Description of the PR

(details of the change, additional tests that have been done, reference to the issue for tracking, etc)

@manuelgomes2 manuelgomes2 changed the title Support for modelPropertyNaming, other camelCase, in Dart. Support for modelPropertyNaming, other then camelCase, in the Dart language May 19, 2018
@lingster
Copy link

lingster commented Jul 2, 2019

Hi, just wondering if there are any updates for this PR and if it will be merged into master? I was about to submit a similar PR to solve this issue for the dart code generator too! Ling

@yk-theapps
Copy link

image

someone, please help to resolve this conflict

@HugoMario
Copy link
Contributor

@yukayeung on it

@HugoMario
Copy link
Contributor

hello guys, i just resolved conflict but PR is failing on this assertion:
https://github.com/swagger-api/swagger-codegen/blob/master/modules/swagger-codegen/src/test/java/io/swagger/codegen/dart/DartModelEnumTest.java#L83

java.lang.AssertionError: expected [Sample] but found [sample]
	at io.swagger.codegen.dart.DartModelEnumTest.overrideEnumTest(DartModelEnumTest.java:83)

@lingster @yukayeung , i'm not familiar with dart, so can you please let me know if the test is ok failing here or should be changed?

@yk-theapps
Copy link

I'm quite a beginner on Dart too. but In Dart, the class naming convention is followed UpperCamelCase too. if code gent DartModelEnum test is case sensitive. it should be changed.
Let seek advice from @lingster since he did helping to do similar PR for this.

@lingster
Copy link

@HugoMario This PR allows users to change the naming of the modelProperty. It's been defaulted to camelCase as per line: 38 here: e08e0eb

I think the tests might pass if you amend this to be:
protected String modelPropertyNaming = CodegenConstants.MODEL_PROPERTY_NAMING_TYPE.PascalCase.name();

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.

6 participants