-
-
Notifications
You must be signed in to change notification settings - Fork 7k
One of support for lagom #6964
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
base: master
Are you sure you want to change the base?
One of support for lagom #6964
Conversation
@fokot thanks for the PR. Can you please PM me via Slack when you've time? |
@@ -0,0 +1,24 @@ | |||
/** |
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.
These outputs under generated/
should be deleted
@@ -163,6 +164,42 @@ public String toOperationId(String operationId) { | |||
return camelize(operationId, true); | |||
} | |||
|
|||
private CodegenModel codegenModel(Object o) { |
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.
This helper function may be confusing. It's extracting the top-level model from our object model but reads as if it intends to extract a model from any input object.
Renaming to extractTopLevelModel
might make it clearer.
{{#discriminator}} | ||
private val discriminator = "{{discriminator.propertyBaseName}}" | ||
|
||
implicit val format: OFormat[{{classname}}] = new OFormat[Fruit]{ |
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.
Fruit
should not exist here…
This can't be merged until the @wing328 has your question been addressed via Slack? If you have a blocker, can you label the PR as WIP? |
@jimschubert I simply showed the oneOf implementation we'd in Java (jersey2) as a reference. |
Hi @clasnake (2017/07), @jimschubert (2017/09) , @shijinkui (2018/01), @ramzimaalej (2018/03), @chameleon82 (2020/03), @Bouillie (2020/04)
sealed trait
andFormat
derivation as generator generates every class to separate file.oneOf
attribute not just a property./generated
folder are what will be generated fromoneoOfDiscriminatorSimple.yaml
. I will remove them they are here so just you can tell what you think bout that without running it.What do you think? Merging it would help our team. Thanks
PR checklist
./bin/generate-samples.sh
to update all Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master. These must match the expectations made by your contribution. You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example./bin/generate-samples.sh bin/config/java*
. For Windows users, please run the script in Git BASH.master