Closed ddijk closed 5 years ago
This I would like to see a junit test for.
Add a new package, dk.jyskebank.tools.enunciate.modules.openapi.abstracttype, or something like that.
Hi Jesper,
I added a unit test for method 'render'. Dick
I am terribly sorry; I was not specific enough.
I would like you to add a REST test package (such as https://github.com/Jyskebank/enunciate-openapi/tree/master/src/test/java/dk/jyskebank/tools/enunciate/modules/openapi/returns).
So that is possible to see what kind of input (java code, REST annotations, and Enunciate annotations) generates the output you want to see. Call it end-to-end/accept test, if you want.
Otherwise I cannot see what the code does.
@ddijk any plans to satisfy reviewed request? This if nice job to have it in the tool.
I was on vacation for the past few weeks. I will continue working on this in the coming weeks.
Hi Jesper, I added the E2E test for JSON schema's oneOf construct.
By the way, do you already know that your plugin is not compatible with Enunciate 12.2.0? (Because the default constructor of DefaultRegistrationContext is no longer available)
Thanks! And no, I did not know. I have been hung up on higher priorities, but I hope to give this plugin some focus next week.
Hi Jesper,
I already looked into this and made a few code changes. I will create a PR in the coming days.
Regards, Dick Jesper Skov schreef op 2019-08-29 07:15:
Thanks! And no, I did not know. I have been hung up on higher priorities, but I hope to give this plugin some focus next week.
-- You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub [1], or mute the thread [2].
Links:
[1] https://github.com/Jyskebank/enunciate-openapi/pull/16?email_source=notifications&email_token=AAXXDLLVWB3XBTK64PM7TV3QG5LOTA5CNFSM4IG2A462YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5NILBA#issuecomment-526026116 [2] https://github.com/notifications/unsubscribe-auth/AAXXDLIZHEL52UAS7X23GIDQG5LOTANCNFSM4IG2A46Q
I have merged this (with some changes) as #16894321a0a6419778a042ed58770c97f03ac8f83f. Love the test classes :)
Took the liberty to strip out the error message stuff, not really relevant for the test.
Cheers!
To model an abstract class correctly in JSON schema, I would like to add JSON schem's 'oneOf' construct. This way, clients can see which concrete classes can be used in a request that contains a field of the abstract type.
When you generate Java client stubs from the resulting openapi.yml, a common interface is generated that all the concrete classes implement.