Skip to content

[csharp] Fix interfacePrefix sensitivity + default#4561

Merged
wing328 merged 1 commit intoswagger-api:masterfrom
jimschubert:csharp-interface-fix
Jan 15, 2017
Merged

[csharp] Fix interfacePrefix sensitivity + default#4561
wing328 merged 1 commit intoswagger-api:masterfrom
jimschubert:csharp-interface-fix

Conversation

@jimschubert
Copy link
Copy Markdown
Contributor

After merging the fix with another C# change, noticed case sensitivity
issue for the true/false checks. Also noticed my original implementation
wasn't setting the default I- prefix as intended. This commit resolves
those three issues.

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

#4557 added support for customizing the interface prefix used in NancyFX Server and C# Client generators. That implementation did a case sensitive comparison in the true and false checks. It also didn't set the default I prefix unless the interfacePrefix option was supplied.

In addition to the checks from the original PR:

# Default behavior, prefix with I-
./bin/csharp-petstore.sh --additional-properties interfacePrefix=true

# Customize without the default prefix
./bin/csharp-petstore.sh --additional-properties interfacePrefix=false

# Customize using your own prefix
./bin/csharp-petstore.sh --additional-properties interfacePrefix=ZZ

Also evaluate:

./bin/csharp-petstore.sh

To ensure I- prefix default has not changed.

After merging the fix with another C# change, noticed case sensitivity
issue for the true/false checks. Also noticed my original implementation
wasn't setting the default I- prefix as intended. This commit resolves
those three issues.
@wing328 wing328 added this to the v2.2.2 milestone Jan 15, 2017
@wing328 wing328 merged commit 23c5376 into swagger-api:master Jan 15, 2017
@jimschubert jimschubert deleted the csharp-interface-fix branch January 16, 2017 01:17
davidgri pushed a commit to davidgri/swagger-codegen that referenced this pull request May 11, 2017
After merging the fix with another C# change, noticed case sensitivity
issue for the true/false checks. Also noticed my original implementation
wasn't setting the default I- prefix as intended. This commit resolves
those three issues.
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