-
Notifications
You must be signed in to change notification settings - Fork 353
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(client): update jackson client generation to always annotate all…
… fields (#1976) ### 📝 Description Update Jackson client generation logic to always annotate all fields with @get:JsonProperty. This is a workaround to Jackson limitations due to its reliance on reflections to find getters/setters following JavaBean naming conventions. Simple mutation: ``` graphql mutation CreateIssuedInvoice($input: IssuedInvoiceInput!) { CreateIssuedInvoice(IssuedInvoice: $input) { ID Stav CisloDokladu } } ``` Genarated before change: ```kotlin public const val CREATE_ISSUED_INVOICE: String = "mutation CreateIssuedInvoice(${'$'}input: IssuedInvoiceInput!) {\n CreateIssuedInvoice(IssuedInvoice: ${'$'}input) {\n ID\n Stav\n CisloDokladu\n }\n}" @generated public class CreateIssuedInvoice( override val variables: CreateIssuedInvoice.Variables, ) : GraphQLClientRequest<CreateIssuedInvoice.Result> { override val query: String = CREATE_ISSUED_INVOICE override val operationName: String = "CreateIssuedInvoice" override fun responseType(): KClass<CreateIssuedInvoice.Result> = CreateIssuedInvoice.Result::class @generated public data class Variables( @get:JsonProperty(value = "input") public val input: IssuedInvoiceInput, ) /** * Dotazy pro zápis, editaci a mazání S5 objektů */ @generated public data class Result( /** * Faktura vydaná (zápis) */ public val CreateIssuedInvoice: IssuedInvoice? = null, ) } ``` Genareted after change: ```kotlin public const val CREATE_ISSUED_INVOICE: String = "mutation CreateIssuedInvoice(${'$'}input: IssuedInvoiceInput!) {\n CreateIssuedInvoice(IssuedInvoice: ${'$'}input) {\n ID\n Stav\n CisloDokladu\n }\n}" @generated public class CreateIssuedInvoice( override val variables: CreateIssuedInvoice.Variables, ) : GraphQLClientRequest<CreateIssuedInvoice.Result> { override val query: String = CREATE_ISSUED_INVOICE override val operationName: String = "CreateIssuedInvoice" override fun responseType(): KClass<CreateIssuedInvoice.Result> = CreateIssuedInvoice.Result::class @generated public data class Variables( @get:JsonProperty(value = "input") public val input: IssuedInvoiceInput, ) /** * Dotazy pro zápis, editaci a mazání S5 objektů */ @generated public data class Result( /** * Faktura vydaná (zápis) */ @get:JsonProperty("CreateIssuedInvoice") public val CreateIssuedInvoice: IssuedInvoice? = null, ) } ``` data class IssuedInvoice **before** change: ```kotlin @generated public data class IssuedInvoice( /** * ID */ @JsonSerialize(converter = UUIDToAnyConverter::class) @JsonDeserialize(converter = AnyToUUIDConverter::class) public val ID: UUID? = null, /** * Stav */ public val Stav: Int? = null, /** * Číslo dokladu */ public val CisloDokladu: String? = null, ) ``` data class IssuedInvoice **after** change: ```kotlin @generated public data class IssuedInvoice( /** * ID */ @JsonSerialize(converter = UUIDToAnyConverter::class) @JsonDeserialize(converter = AnyToUUIDConverter::class) @get:JsonProperty("ID") public val ID: UUID? = null, /** * Stav */ @get:JsonProperty("Stav") public val Stav: Int? = null, /** * Číslo dokladu */ @get:JsonProperty("CisloDokladu") public val CisloDokladu: String? = null, ) ``` ### 🔗 Related Issues https://kotlinlang.slack.com/archives/CQLNT7B29/p1717655752084109
- Loading branch information
Showing
85 changed files
with
303 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.