Skip to content
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

[csharp] Reference this.Configuration in client api template #7394

Merged
merged 2 commits into from Jan 22, 2018

Conversation

jimschubert
Copy link
Contributor

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

Implicit property access (without this. prefix) leads to ambiguous references when specs define a Configuration model. Fix is to prefix all property references with this. in the api template, and use fully qualified type name for Configuration from the client package whenever we refer to infrastructural Configuration.

See #7218 (this only partially addresses reported issue)

I'm having issues installing mono locally on my new machine, so leaning on CI to verify generated samples.

Unprefixed Configuration property access leads to ambiguous references
when spec defines a Configuration model.
@wing328 wing328 added this to the v2.4.0 milestone Jan 22, 2018
@wing328 wing328 merged commit ed7af73 into swagger-api:master Jan 22, 2018
jimschubert added a commit to jimschubert/swagger-codegen that referenced this pull request Jan 22, 2018
* master: (133 commits)
  add a link to ebook (polish version)
  Add R namespace file (swagger-api#7467)
  Add Spring Petstore samples (async, java8-localdatetime) to CircleCI (swagger-api#7468)
  Revised core team members
  Ada code generator corrected: "=>" instead of "->". Fixes swagger-api#7450 (swagger-api#7456)
  Fixes issue swagger-api#7177 (SpringCodeGen dateLibrary "java8-localdatetime" option is ignored). (swagger-api#7178)
  Issue-7438 Fix that prevents generating interfaces when interfaceOnly is false. (swagger-api#7439)
  swagger-api#7093 - Add maven wrapper (swagger-api#7356)
  [csharp] Support arrays of arrays for properties and models (swagger-api#7400)
  [csharp] Fix ToJson to work with composition and polymorphism (swagger-api#7399)
  [csharp] Reference this.Configuration in client api template (swagger-api#7394)
  [JAX-RS][Spec] Removes throws Exception. (swagger-api#7437)
  Use supportsES6 flag in ts compilation for language typescript-angular (swagger-api#7408)
  Fix 7457: [Ada] wrong order for generated structures in *-models.ads (swagger-api#7462)
  Fix 7459: [Ada] wrong JSON in POST operations (swagger-api#7460)
  [erlang-client] Erlang request utils (swagger-api#7257)
  reenable pushing snapshot to maven repo
  Create CODE_OF_CONDUCT.md
  comment out update to docker image
  deleted unnecessary notes (swagger-api#7454)
  ...
viclovsky pushed a commit to viclovsky/swagger-codegen that referenced this pull request Jan 23, 2018
…-api#7394)

* [csharp] this.Configuration in api template

Unprefixed Configuration property access leads to ambiguous references
when spec defines a Configuration model.

* [csharp] Regenerate samples
@jimschubert jimschubert deleted the csharp-7218-configuration branch February 5, 2018 03:32
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.

None yet

2 participants