swagger-api / swagger-api/swagger-codegen
[Java*] Ensure cross-language template consistency
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
The cross-language consisteny of templates is currently not ensured, leading to low quality over time as features are implemented and not maintained over all languages immediately.
Swagger-codegen version
2.2.3-SNAPSHOT
Related issues
Discussion started in issue #4386
Suggest a Fix
I suggest two ways to go:
a) Use centralized template snippets (mustache lambdas)
b) Ensure consistency by adding Unittests which will track snippets across all languages with opt-out decision. Opt-outs have to be explained in the unittest/template.
IMHO a) would be easier to do as we have only one place to maintain.
b) allows better tracking of changes and is maybe better by not forcing immediate updates cross-languages.
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 reading issue #4386 and reviewing how the cross-language templates are maintained. Compare the centralized Mustache-lambda proposal with the unittest approach, including how opt-outs would be explained; done requires an agreed consistency strategy and a way to track or maintain template changes across languages.
Written by the indexing model from the issue text.
Assessment
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100