-
Notifications
You must be signed in to change notification settings - Fork 2
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
Code generator issue with nested 'allOf' schema definitions #7
Comments
hi @tvetter thanks for reporting this and also point to the we the problem is.. I'll be on this next week.. in the time being if you are happy creating a PR on upstream project I will be more than happy releasing it next week.. |
hi @tvetter I've just released version 0.8.5, can you add this dependency to your maven plugin dependencies to confirm it works for your usecase Take into account that the release may take a few minutes to get into maven central |
Hi @ivangsa Thanks for the quick fix. It works for the provided sample definition. However there is still an issue with the following definition:
Expected attributes: test1a, test1b, test1c, test2a, test2b I wasn't able to analyze the code yet. I will let you know in case I have some pointers. Thanks and best regards, |
hi @tvetter I've uploades a (hopefully) generic fix for this.. Can you download and build from source in order to test this snapshot before making a release Thanks |
Hi @ivangsa The Snapshot works for me. Thanks! Best regards, |
released version 0.8.6 |
hey @tvetter thanks for taking the time to report this, it helps make the library better.. I have one question if you don't mind:
|
Hey @ivangsa I didn't use Best regards, |
Hi @ivangsa there is one more minor issue with
With a provided message name that name is used as class name. As the message name is optional the schema name should be used in absence of the message name. As I said that is a minor issue. Just wanted to let you know. Working definition:
Best regards, |
Hi,
I'm using zenwave-sdk-maven-plugin (version 1.6.0) with code generator 'jsonschema2pojo' in order to generate Java classes from an AsyncAPI v3 definition.
There is an an issue with the generated classes when using nested 'allOf' schema definitions as shown in the following sample definition:
Expected attributes of class Test: test1a, test1b, test2a, test2b
Actual attributes: test2a, test2b
It looks like during the merge of 'allOf' definitions the properties of the last definition override previously added properties.
See https://github.com/ZenWave360/json-schema-ref-parser-jvm/blob/main/src/main/java/io/zenwave360/jsonrefparser/%24RefParser.java#L141
Thanks and best regards,
Thorsten
The text was updated successfully, but these errors were encountered: