OpenAPITools / OpenAPITools/openapi-generator
[BUG] 'Generation failed for csharp' from generate-samples.sh in master
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Bug Report Checklist
- Have you provided a full/minimal spec to reproduce the issue?
- Have you validated the input using an OpenAPI validator?
- Have you tested with the latest master to confirm the issue still exists?
- Have you searched for related issues/PRs?
- What's the actual output vs expected output?
- [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
I am not able to follow steps given in the PR template ('run ./bin/generate-samples.sh').
This should not have passed the CI checks. The script fails in just 30 seconds!
openapi-generator version
7.19.0-SNAPSHOT
OpenAPI declaration file content or url
Generation Details
Steps to reproduce
To reproduce, run with today's 'master'
git switch -d 19945d909f32fb44b1d4f52f927c8f8116931cd1
./bin/generate-samples.sh ./bin/configs/*.yaml
Result:
[pool-1-thread-14] Generation failed for csharp: (IllegalArgumentException) The input (net10.0) contains Invalid .NET framework version: net10.0. List of supported versions: netstandard1.3, netstandard1.4, netstandard1.5, netstandard1.6, netstandard2.0, netstandard2.1, net47, net48, net8.0, net9.0
java.lang.IllegalArgumentException: The input (net10.0) contains Invalid .NET framework version: net10.0. List of supported versions: netstandard1.3, netstandard1.4, netstandard1.5, netstandard1.6, netstandard2.0, netstandard2.1, net47, net48, net8.0, net9.0
at org.openapitools.codegen.languages.CSharpClientCodegen.processOpts(CSharpClientCodegen.java:818)
at org.openapitools.codegen.DefaultGenerator.configureGeneratorProperties(DefaultGenerator.java:252)
at org.openapitools.codegen.DefaultGenerator.generate(DefaultGenerator.java:1277)
at org.openapitools.codegen.cmd.GenerateBatch$GenerationRunner.run(GenerateBatch.java:227)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
Related issues/PRs
Suggest a fix
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running bin/generate-samples.sh ./bin/configs/*.yaml at the reported revision, then inspect CSharpClientCodegen.java around processOpts and the generation configuration named in the stack trace. Compare the requested net10.0 value with the supported framework versions. Done means the C# generation completes successfully when the sample script is run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, java, shell
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100