Skip to content

[csharp-netcore] Adds features for #11010 and #11001 #11015

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

RubberChickenParadise
Copy link

Adds the features requested in #11010 and #11001 for csharp-netcore client generation

PR checklist

  • [ x] Read the contribution guidelines.
  • [ x] Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • [x ] Run the following to build the project and update samples:
    ./mvnw clean package 
    ./bin/generate-samples.sh
    ./bin/utils/export_docs_generators.sh
    
    Commit all changed files.
    This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
    These must match the expectations made by your contribution.
    You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*.
    For Windows users, please run the script in Git BASH.
  • [x ] File the PR against the correct branch: master (5.3.0), 6.0.x
  • [x ] If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

@mandrean (2017/08) @frankyjuang (2019/09) @shibayan (2020/02) @Blackclaws (2021/03) @lucamazzanti (2021/05)

Jay Oursler added 4 commits December 1, 2021 13:25
…er request NONCE needs to be added. Adding the RequestOptions as a parameter moves this more inline with the typescript-axios client.
…jection I am configuring the configuration with a singleton scope.

This prevents updating the ApiToken eaily when the JWT expires and needs to be refreshed.  By adding the GetApiToken producer function it provides an extension point to add the necessary token refresh logic with minimal changes needed to the configuration.
The default is to return the AccessToken so existing configurations work.
@RubberChickenParadise RubberChickenParadise changed the title Adds features for #11010 and #11001 [csharp-netcore] Adds features for #11010 and #11001 Dec 1, 2021
@wing328
Copy link
Member

wing328 commented Dec 22, 2021

@RubberChickenParadise can you please resolve the merge conflicts when you've time?

If you're using Windows, pleas use Git Bash to run the following (step 3):

./mvnw clean package 
./bin/generate-samples.sh
./bin/utils/export_docs_generators.sh

let us know if you need any help.

@RubberChickenParadise
Copy link
Author

@wing328 i have resolved the conflicts once already.

I can do it again

@@ -22,7 +22,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
|sourceFolder|source folder for generated code| |OpenAPI/src|
|sourceFolder|source folder for generated code| |OpenAPI\src|
Copy link
Member

Choose a reason for hiding this comment

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

@RubberChickenParadise it shouldn't use ''. Please give Git bash (windows) a try to see if this's still repeatable.

# Conflicts:
#	docs/generators/java.md
#	docs/generators/ruby.md
#	samples/client/others/csharp-netcore-complex-files/.openapi-generator/VERSION
#	samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/.openapi-generator/VERSION
#	samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/.openapi-generator/VERSION
#	samples/client/petstore/csharp-netcore/OpenAPIClient-net47/.openapi-generator/VERSION
#	samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/.openapi-generator/VERSION
#	samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/VERSION
#	samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/VERSION
#	samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/.openapi-generator/VERSION
@RubberChickenParadise
Copy link
Author

@wing328 Getting some build errors with ./mvnw clean package on git bash. not sure whats going on as I am not a java dev.

[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR] DefaultGeneratorTest.supportCustomTemplateEngine:311 ▒ Runtime Could not gener...
[ERROR] StringHelpersTest.startsWithSectionalTest:47->evaluate:28 ▒ Handlebars inline@...
[ERROR] StringHelpersTest.startsWithTest:61->evaluate:28 ▒ Handlebars inline@43bd77be:...
[ERROR] StringHelpersTest.startsWithYesOverrideTest:81->evaluate:28 ▒ Handlebars inlin...
[INFO]
[ERROR] Tests run: 1553, Failures: 4, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for openapi-generator-project 5.4.0-SNAPSHOT:
[INFO]
[INFO] openapi-generator-project .......................... SUCCESS [ 2.031 s]
[INFO] openapi-generator-core ............................. SUCCESS [ 9.671 s]
[INFO] openapi-generator (core library) ................... FAILURE [02:03 min]
[INFO] openapi-generator (executable) ..................... SKIPPED
[INFO] openapi-generator (maven-plugin) ................... SKIPPED
[INFO] openapi-generator-gradle-plugin (maven wrapper) .... SKIPPED
[INFO] openapi-generator-online ........................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:16 min
[INFO] Finished at: 2022-01-04T17:01:24-06:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test (default-test) on project openapi-generator: There are test failures.

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