Skip to content

Model split fix via java parser#20

Open
gkocak-scottlogic wants to merge 1 commit intomainfrom
feat/model-split
Open

Model split fix via java parser#20
gkocak-scottlogic wants to merge 1 commit intomainfrom
feat/model-split

Conversation

@gkocak-scottlogic
Copy link
Copy Markdown
Collaborator

@gkocak-scottlogic gkocak-scottlogic commented Mar 9, 2023

Placeholder PR for model split logic via java parser. Requires changes to be called at postProcess stage after #14 is merged with java-parser dependency.


Edit and clarification:

Initially, this PR has been proposed becuase ApiModel model classes are generated in one single java file and this limits the visibility of the generated model classes to package visible.

The way this PR operates is that it uses java-parser in node space on top of the initially generated code to alter/manipulate the generated model classes.

However, after #14 is merged, we#ve come to the conclusion that the class visibility was not an actual immediate issue for the generated code.

So, we don't require the model api classes to be in separate java files with public visibility, at least not yet. However, this procedure might still be necessary for future work to be carried so, the consensus was to leave this work in this PR without merging.

@ms14981
Copy link
Copy Markdown

ms14981 commented Mar 15, 2023

As discussed, I think the plan for this is not to merge, at least for the moment, as it is a short term solution for the problem in ScottLogic/openapi-forge#180. Having many classes in one in ApiModel.java wasn't an issue for the cucumber tests in the end. However, we'll keep this PR for the moment as a point of reference if we do need it, or we need to do something similar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants