fabrikt fails to generate classes with API docs with "allOf" schemas #326
Unanswered
Christian1984
asked this question in
Q&A
Replies: 2 comments 1 reply
-
Most issues normally relate to deep nested incline object definitions, where fabrikt has to guess the name of the classes to generate. Especially so when those inclined definitions occur within polymorphic operators such as allof. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks for getting back to me! I understand, but then why does it guess the class name and reference it without creating it or a proper interface? If this happens, wouldn‘t you expect some warning or, if the code does not even build, expect an error?Am 15.10.2024 um 20:44 schrieb Conor Gallagher ***@***.***>:
Most issues normally relate to deep nested incline object definitions, where fabrikt has to guess the name of the classes to generate. Especially so when those inclined definitions occur within polymorphic operators such as allof.
Extracting some of the inline definitions to first-class definitions using ref usually helps.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! I am trying to generate an API Client and models from an openapi v3.0.1 API documentation using fabrikt v17.4.0.
The document in question can be found here: https://developers.shippeo.com/catalog/api/37ef941f-f328-34c4-acbf-02d7dcb032fc/doc?page=8fcf2df0-00e2-417d-8f2d-f000e2e17d79 (json-File can be downloaded with the Download button) - The documentation makes excessive use of
"allOf"
tags, which I assume are the root cause of my problem.I am using the follwing excerpt from my
pom.xml
to create my Kotlin Sources with Maven:and then run
mvn exec:java@generate-pairing-api -X
. The build works fine, even without any warnings, but the code generator generates code that references missing classes and thus won't compile.For example,
SharedSituationJustificationUncharterCharter.kt
looks like thisIn
SharedSituationJustificationUnpairPair.kt
a classPairMean
is referenced which does not exist!Is this a problem with the provided api documentation, my configuration or are there issues with fabrikt that cause this?
Beta Was this translation helpful? Give feedback.
All reactions