OpenAPITools / OpenAPITools/openapi-generator
[BUG] csharp* should rename `system` components to things that aren't `system`.
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 (example)? (It shows no errors as far as I can tell)
- 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
When I generate a csharp-netcore solution for https://raw.githubusercontent.com/SpaceTradersAPI/api-docs/main/reference/SpaceTraders.json it generates a class called system - which breaks the entire project, because system should be reserved for the systems system.
openapi-generator version
openapi-generator-cli 6.6.0-SNAPSHOT
commit : ff9b384
OpenAPI declaration file content or url
https://raw.githubusercontent.com/SpaceTradersAPI/api-docs/main/reference/SpaceTraders.json
Generation Details
Steps to reproduce
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -i https://raw.githubusercontent.com/SpaceTradersAPI/api-docs/main/reference/SpaceTraders.json -g csharp-netcore -o ~/Ship/
Open in your favorite C# editor or even just try to build it.
Related issues/PRs
Not that I know of
Suggest a fix
No idea.
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 provided openapi-generator-cli command with the linked SpaceTradersAPI specification and the csharp-netcore generator to reproduce the invalid system class. Then trace the csharp-netcore name-generation and reserved-word handling entry points. Done means the generated C# solution builds without the conflicting system component name.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100