-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(generators): bunch of improvements on generator, and 140 width in java #560
Conversation
✅ Deploy Preview for api-clients-automation canceled.
|
✗ The generated branch has been deleted.If the PR has been merged, you can check the generated code on the |
lol |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Such a huge clean!!! Nothing to add
{ | ||
"files": "*.java", | ||
"options": { | ||
"printWidth": 140 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
definitely needed!
private List<Object> getPackageDependencies() { | ||
List<Object> result = new ArrayList<Object>(); | ||
@Override | ||
public void addDataToBundle(Map<String, Object> bundle) throws GeneratorException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does addDataToBundle
happens before addExtraToBundle
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addExtraToBundle
was a wrapper to catch and exit in case of exception, but this is already handled by the caller, so this function is gone and we call addDataToBundle
directly.
🧭 What and Why
A bit of rework on generators, to have a more standard way of doing them.
The data is supposed to flow from top to bottom, in this order:
processOptions
fromOperation
postProcessOperationsWithModels
postProcessAllModels
I've reworked the error handling a bit and harmonized the code.
Since we are in 2022 and everyones owns a 4K monitor I've increased the maximum line length from 80 to 140 char, because it was unreadable in some place (this will create lots of change in the generated client, for the better).
🧪 Test
CI