Repository navigation
Migrazione a Jackson 3 della conversione RPT/RT e dei client OpenAPI generati - #109
Merged
Merged
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cosa cambia
Rimuove gli ultimi usi diretti di Jackson 2 (
com.fasterxml.jackson.databind/core/module) dal progetto.RptRtJsonConverter/PagoPaDateModule: passano a Jackson 3 (tools.jackson) e al modulotools.jackson.module:jackson-module-jakarta-xmlbind-annotations. Il mapper è costruito conJsonMapper.builderWithJackson2Defaults(): Jackson 3 cambia alcuni default (per esempio ordina le proprietà alfabeticamente), e così il JSON prodotto resta identico.READ_ENUMS_USING_TO_STRINGeWRITE_DATES_AS_TIMESTAMPSpassano ai nuoviEnumFeature/DateTimeFeature.govpay-stampe-clientebizevents-client: aggiuntiuseSpringBoot4euseJackson3, come già ingovpay-ec-client. Le classi di supporto generate (RFC3339*) dipendevano da jackson-databind 2.RptRtJsonConverterTesteStampePayloadContractTestusano Jackson 3. Il secondo converte ora il payload con un mapper Jackson 3 (findAndAddModules), lo stesso tipo che usa l'applicazione.Verifica
toRtJson,toRtMap,toRptJson) su 4 tracciati di test (rt-sanp230.xml,rt-v2-ok.xml,rt-v2_2-ok.xml,rt-v2_2-ko.xml), ciascuno provato con tutte e 6 le versioni SANP. Dopo la migrazione l'output è identico byte per byte, comprese date, enum, null e ordine dei campi.mvn clean testdopo il rebase sumain: 1396 test, 0 failure.Cosa resta di Jackson 2
jackson-annotations(com.fasterxml.jackson.annotation), che Jackson 3 continua a usare.jackson-databind/dataformat-yaml/datatype-jsr3102.x, transitivi di springdoc tramiteswagger-core-jakarta: non sono usati dal codice del progetto e resteranno finché swagger-core non passa a Jackson 3.