Repository navigation
[kotlin] Add MicroProfile REST client support - #25374
Conversation
There was a problem hiding this comment.
All reported issues were addressed across 23 files
Reply to a comment to ask cubic a question or push back. It learns from your replies.
View guided diff | Re-trigger cubic
Generate Kotlin-native clients for MicroProfile runtimes with optional Mutiny APIs, preserving Kotlin nullability at service boundaries. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
9718147 to
b6ecb9b
Compare
Reject unsupported query formats instead of silently changing the contract, compile against matching MicroProfile API versions, and document Kotlin nullability accurately. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Make discriminated alternatives implement their union interfaces, reject invalid required JSON values, and include CDI discovery metadata for separate client JARs. Extend the generated sample and real-HTTP regression coverage. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
All reported issues were addressed across 29 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
Keep shared Jackson formatting unchanged outside MicroProfile, reject unsupported Android Room generation, and link inherited properties from concrete model documentation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
thanks for the PR i tried to build the project with your change locally (windows box) but got the following errors: can you please review the errors when you've time? |
Select generated sources with native Path components and reject empty source lists before compilation. Preserve exact generator whitespace in checked-in MicroProfile samples so CI regeneration has no diff. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Of course! This should be resolved with the latest commit. |
| @@ -0,0 +1,13 @@ | |||
| generatorName: kotlin | |||
| outputDir: samples/client/petstore/kotlin-jvm-microprofile-mutiny | |||
There was a problem hiding this comment.
can you please add the new folder to the github workflow for testing kotlin clients?
There was a problem hiding this comment.
I've added it to the list. Is that what you meant?
Build the generated library in the Kotlin client matrix and run its real-HTTP integration suite. Use JDK 17 for this Quarkus sample while preserving JDK 11 for existing entries. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
All reported issues were addressed across 1 file (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
Keep the maintainer-requested sample list addition without a custom JDK or integration-test step. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
All reported issues were addressed across 1 file (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
Use JDK 17 and cached Maven dependencies for the Quarkus HTTP tests instead of invoking a missing Gradle wrapper. Preserve existing Gradle jobs unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Summary
Related to #12065: adds Kotlin MicroProfile clients usable with Quarkus, not the server-generation portion of that request.
Adds
library=jvm-microprofileto the Kotlin client generator so MicroProfile applications can use Kotlin interfaces and models instead of Java platform types, while retaining their runtime's transport, authentication and header providers.Uni<T>, and explicit or class-derived configuration keys.Uni<Void?>for bodyless operations. Required nullable fields require JSON presence; required non-null fields reject explicit null, including primitives.allOfand discriminated objectoneOf/anyOfinterfaces, including alternatives shared between unions.META-INF/beans.xmlso separately built client JARs can be discovered by CDI/Quarkus.The hierarchy repair is related to #19928 and #22013, but is scoped to this new library; it does not fix those reports' Moshi/Spring configurations. Other Kotlin client libraries retain their existing behavior.
Undiscriminated unions, complete JSON Schema validation and missing-versus-null tracking are outside scope. Jackson's Kotlin module is required; strict collection-element null checking remains a runtime configuration.
Verification
130 targeted generator tests and Checkstyle pass, including a non-MicroProfile Jackson formatting regression. The generated sample has 17 passing real-HTTP Quarkus tests covering polymorphism, nullability, errors, bodyless responses and combined header-factory/header-parameter/filter decorations. Separate-JAR consumption also passes in a Quarkus acceptance harness. Generated sample changes are confined to this library.
PR checklist