OpenAPITools / OpenAPITools/openapi-generator
[BUG][csharp-netcore] -p modelPropertyNaming=original not considered everywhere
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Description
Example:
In general this option seems to work, but there are cases, where it does not: I have in a project a class with attributes "cid" and "_cid". This will result to errors in the instance creation (constructor) method:
public CATIAPIAddressQueueMembership(string cid = default(string), .... , string cid = default(string),......)
{
this._cid = cid;
....
this.cid = cid;
....
Another position is the documentation in front of this method ...
...
/// Framework Attribute. Maintains a unique ID - generated on the client side.
...
/// cid.
....
openapi-generator version
5.4.0
Generation Details
Steps to reproduce
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 reproducing the C# .NET Core generation described for openapi-generator 5.4.0 with modelPropertyNaming=original and attributes named "cid" and "_cid". Inspect the C# model generation templates and naming handling; done means the constructor parameters and XML documentation parameters remain distinct and the generated class compiles.
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
- Needs clarification
- Newbie friendliness
- 25/100