OpenAPITools / OpenAPITools/openapi-generator

[Discussion] Help with updating customized templates

Open
#11,476 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement: Feature
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

I have customised .mustache templates for a python client in the past. For example I have adjusted some of the code in api_client.mustache.
Now I have re-generated the client code and realised that I'll need to update the templates as well because for example a parameter called _spec_property_naming had been added.

Thus I am now left with the template that I had edited and the updated template and would like to merge them. They both are different and I am having a hard time deciding which change was done by me originally what what is just a version update.
Is there a way to make this easier?

I do understand that if I had added comments or committed the original template and then my changes this would be easier...but I haven't 😅

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the customized and updated api_client.mustache templates and identify the parts that make user changes difficult to distinguish from generator updates. The issue is complete when it provides or documents a practical way to merge customized templates with updated versions.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.