swagger-api / swagger-api/swagger-codegen
Why is there no accessor to the members of the generators and the constructor define properties ?
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Hi all,
I'm in the process of learning swagger-codegen and i'm surprised that there is no accessors on the members of the generators classes and also that some properties are defined in the constructors.
In order to configure the generators from the swagger-codegen-maven-plugin, i had to add the accessors ( getter/setter) and move the construction of the properties (additionalProperties, supportingFiles) in a init method which is called from the constructor and the setters.
I can submit this patch in a pull request but before i do so, i would like to know if i have missed something ? it is strange that the accessors are missing, perhaps there is a good reason ?
I also have patched the maven plugin to use reflection to configure the generators, and all the code is in the forks of the repos on my account (swagger-codegen and swagger-codegen-maven-plugin).
Thanks in advance for any answer,
Best regards
PS: Take a look at this commit if i'm not clear enough : https://github.com/rastaman/swagger-codegen/commit/9ab303f0ba10e86a2c90c917d876958c1c48444a
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 the linked commit and inspect the generator classes and swagger-codegen-maven-plugin changes described there. Determine whether accessors, initialization changes, and reflection-based configuration are the intended design; done requires a decided scope and coordinated accepted changes rather than only a fork patch.
Written by the indexing model from the issue text.
Assessment
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100