swagger-api / swagger-api/swagger-codegen-generators
[C#][.NET Core] Add support for MaxLength and MinLength data annotation attributes?
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 299
- Forks
- 439
- PR merge metrics
- No merged PRs in 30d
Description
Is there a way to add support for MaxLength and MinLength data annotation attributes?
openapi-generator.tech supports it
https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/resources/aspnetcore/3.0/model.mustache but it generates very buggy / uncompilable code
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 with modules/openapi-generator/src/main/resources/aspnetcore/3.0/model.mustache and compare its handling of the MaxLength and MinLength data annotation attributes. Confirm that generated C#/.NET Core models include the requested annotations and produce compilable code rather than the buggy output described.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100