swift-openapi-generator icon indicating copy to clipboard operation
swift-openapi-generator copied to clipboard

Support for XML request body and response body

Open ugocottin opened this issue 1 year ago • 6 comments

Motivation

See this issue for more.

Modifications

Based on modifications in the swift-openapi-runtime, I've added support for XML coding strategy and content-type category.

Result

Bodies with XML content-type can be encoded and decoded through xmlCoder in OpenAPIRuntime.Configuration.

Test Plan

I've updated test for ContentType parsing with application/xml content-type. Encoding and decoding to XML are out of scope of the tests, because encoding and decoding logic must be provided by user through custom coder implementation.

ugocottin avatar Oct 31 '24 12:10 ugocottin

@ugocottin could you also review this section of OpenAPI to see if we should be taking that info into account? https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#xml-object

czechboy0 avatar Nov 01 '24 09:11 czechboy0

@czechboy0 Regarding XML object metadata, I think it is out of the scope of this PR, but should definitely be implemented later for better XML support.

ugocottin avatar Jan 09 '25 20:01 ugocottin

Hello guys

Do you have an estimated date for merging this feature?

Thanks

nihedr9 avatar Jan 12 '25 20:01 nihedr9

No date estimate. When it's ready, it'll get merged. We appreciate all contributions, on any timeline, as many folks invest their free time into these pull requests.

czechboy0 avatar Jan 12 '25 20:01 czechboy0

No date estimate. When it's ready, it'll get merged. We appreciate all contributions, on any timeline, as many folks invest their free time into these pull requests.

Is there anything I can do to help?

nihedr9 avatar Jan 13 '25 19:01 nihedr9

Is there anything I can do to help?

I'll let @ugocottin speak to that as the author of this PR.

czechboy0 avatar Jan 14 '25 11:01 czechboy0