[REQ] [rust] Support XML objects in requests and responses
Created by: sverch
Is your feature request related to a problem? Please describe.
I'm trying to generate a client that works with these AWS OpenAPI specs, but the AWS API is XML based, and the specs there all have XML definitions.
I don't know for sure how to tell whether a generator supports this, but if I understand correctly based on this comment that says "this option indicates whether XML structures can be defined by spec document and honored by the caller", the XMLStructureDefinitions
is what says whether a given generator supports XML objects in the requests and responses.
However, it doesn't appear that any clients actually support this feature:
$ git grep "|XMLStructureDefinitions|✓|"
docs/generators/dynamic-html.md:|XMLStructureDefinitions|✓|OAS2,OAS3
docs/generators/html.md:|XMLStructureDefinitions|✓|OAS2,OAS3
docs/generators/html2.md:|XMLStructureDefinitions|✓|OAS2,OAS3
docs/generators/openapi-yaml.md:|XMLStructureDefinitions|✓|OAS2,OAS3
docs/generators/openapi.md:|XMLStructureDefinitions|✓|OAS2,OAS3
docs/generators/spring.md:|XMLStructureDefinitions|✓|OAS2,OAS3
Those are all either documentation or server generators.
Describe the solution you'd like
I would like the generated rust code to support XML based service definitions.
I managed to get the generated code working on a basic level (single call), so here's some idea of what I think is needed for this:
- Use this XML parsing library to replace all uses of the JSON parser that is used currently.
- Honor the XML only features in the specification.
Describe alternatives you've considered
I considered using a different language client, but it doesn't seem like I have another option.
However, I also filed this because I'm not sure if I'm actually understanding this correctly, so any corrections are very welcome!
Additional context
The OpenAPI spec was generated from this AWS service definition using this tool and the resulting specs can be found here.