Skip to content

Conversation

@jimschubert
Copy link
Contributor

@jimschubert jimschubert commented Jan 31, 2017

PR checklist

  • Read the contribution guildelines.
  • Ran the shell/batch 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)
  • Filed the PR against the correct branch: master for non-breaking changes and 2.3.0 branch for breaking (non-backward compatible) changes.

Description of the PR

Based on the fix suggested in #4670 by @marekr.

I modified the test yaml locally by adding the following as a required property to Enum_Test in petstore-with-fake-endpoints-models-for-testing.yaml:

      just_symbol:
        type: string
        default: ">="
        enum:
          - ">="
          - "$"

This generated the expected greater than or equal enum value in the constructor's defaulted parameter list.

I've regenerated the client sample without this fix, because I didn't want to add the symbol-only enum with a default value and potentially break other tests (9 model tests consume this file).

@wing328 wing328 added this to the v2.2.2 milestone Feb 6, 2017
@wing328 wing328 merged commit 96b0d15 into swagger-api:master Feb 6, 2017
Stwissel added a commit to Stwissel/swagger-codegen that referenced this pull request Feb 9, 2017
* 'master' of github.com:swagger-api/swagger-codegen: (40 commits)
  remove default temp folder during initalization (swagger-api#4749)
  [Java-retrofit] Fix for swagger-api#4750 String comparison with equals (swagger-api#4751)
  update java server stub samples with new uuid mapping
  update java petstore with new uuid mapping
  [Java-Feign] Fixed String comparison using equals instead of == operator (swagger-api#4740)
  add SPINEN
  update jaxrs spec petstore sample (mac)
  [Jaxrs-spec] fix usage of Jersey templates in shellscript (swagger-api#4722)
  [Bash] Bash generator improvements (swagger-api#4730)
  [Java][Issue swagger-api#1806] generate using java.util.UUID for UUIDs
  Revert "rx2 support" (swagger-api#4737)
  rx2 support (swagger-api#4708)
  add https and change order for HPE
  add Hewlett Packard Enterprise (hpe.com)
  Add "Simpfony" to list of companies using Swagger (swagger-api#4726)
  add https://www.slamby.com/
  [csharp] Fix enum default value (swagger-api#4681)
  fix issue swagger-api#4672 - XmlExampleGenerator does not properly handle properties of several numeric types (swagger-api#4673)
  [JAXRS-CXF] Issue 4569 - Re-added usage of contextPath in api.mustache (basePath) (swagger-api#4580)
  [Jaxrs-cxf-cdi] merge beanvalidation templates to single one swagger-api#4719 (swagger-api#4723)
  ...
Stwissel added a commit to Stwissel/swagger-codegen that referenced this pull request Feb 9, 2017
* master: (40 commits)
  remove default temp folder during initalization (swagger-api#4749)
  [Java-retrofit] Fix for swagger-api#4750 String comparison with equals (swagger-api#4751)
  update java server stub samples with new uuid mapping
  update java petstore with new uuid mapping
  [Java-Feign] Fixed String comparison using equals instead of == operator (swagger-api#4740)
  add SPINEN
  update jaxrs spec petstore sample (mac)
  [Jaxrs-spec] fix usage of Jersey templates in shellscript (swagger-api#4722)
  [Bash] Bash generator improvements (swagger-api#4730)
  [Java][Issue swagger-api#1806] generate using java.util.UUID for UUIDs
  Revert "rx2 support" (swagger-api#4737)
  rx2 support (swagger-api#4708)
  add https and change order for HPE
  add Hewlett Packard Enterprise (hpe.com)
  Add "Simpfony" to list of companies using Swagger (swagger-api#4726)
  add https://www.slamby.com/
  [csharp] Fix enum default value (swagger-api#4681)
  fix issue swagger-api#4672 - XmlExampleGenerator does not properly handle properties of several numeric types (swagger-api#4673)
  [JAXRS-CXF] Issue 4569 - Re-added usage of contextPath in api.mustache (basePath) (swagger-api#4580)
  [Jaxrs-cxf-cdi] merge beanvalidation templates to single one swagger-api#4719 (swagger-api#4723)
  ...
davidgri pushed a commit to davidgri/swagger-codegen that referenced this pull request May 11, 2017
* [csharp] Prevent enum assign to string

see swagger-api#4670

* [csharp] Regenerate client sample
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