Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing xml prolog and namespaces #1778

Merged
merged 7 commits into from
Apr 11, 2024

Conversation

afranken
Copy link
Member

Description

  • S3Mock does not generate the XML prolog (<?xml version="1.0" encoding="UTF-8"?>)
  • S3Mock does not generate the XML namespace into the root XML elements of the responses

While the AWS SDKs do not depend on this, it is the right thing to do.
Other libraries like the aiohttp-s3-client depend on the declarations being present in the XML responses.

Related Issue

#1754

Tasks

  • I have signed the CLA.
  • I have written tests and verified that they fail without my change.

@afranken afranken added the bug label Apr 10, 2024
@afranken afranken self-assigned this Apr 10, 2024
Remove unneeded @JsonRootName annotations
Use central "Include.NON_EMPTY" config instead of annotating every POJO
With 2.17.0+, they added polymorphic (de-)serialization using "xsi:type"
so we can finally use Jackson only for all requests and responses. :)
@afranken
Copy link
Member Author

More refactorings:

jackson-databind-xml now supports polymorphic (de-)serialization with xsi:type:
FasterXML/jackson-dataformat-xml#324
FasterXML/jackson-dataformat-xml#634

I could finally get rid of JAX-B for (de-)serialization of AccessControlList requests and responses. :)

The only caveat is that @JacksonXmlElementWrapper is not supported with record classes:
FasterXML/jackson-dataformat-xml#517

Spring now validates the contents of the "content-type" header. The
value must contain a "/".
@afranken afranken merged commit 432846e into main Apr 11, 2024
6 checks passed
@afranken afranken deleted the 1754-missing-xml-prolog-and-namespaces branch April 11, 2024 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant