swagger-api / swagger-api/swagger-codegen
[C#] Interfaces created for OneOf not implemented
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
When I try to generate the C# files for the OAS spec from here (raw), the interfaces generated for the OneOf sections do not have implementations.
This interface has no implementations, so I cannot create a valid request.
Strangely, the interface created is not prefixed with I.
Have I misconfigured something? Am I using the codegen tool incorrectly? Is the OAS not well-structured?
Swagger-codegen version
3.0.54
Swagger declaration file content or url
https://digital.nhs.uk/restapi/oas/324177
Command line used for generation
java -jar .\swagger-codegen-cli.jar generate -i https://digital.nhs.uk/restapi/oas/324177 -l csharp
Steps to reproduce
- Run command above.
- Navigate to IO.Swagger.Model.OneOfR4PrepareBodyEntryItems
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
Run the reported Java command with the linked OAS document and inspect IO.Swagger.Model.OneOfR4PrepareBodyEntryItems in the generated C# output. Trace the C# generator path that handles the OneOf sections and compare the generated interface with the referenced schema. Done means the generated OneOf types have usable implementations and valid C# naming.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100