Skip to content

Built-in XML body input validation #1146

@doteric

Description

@doteric

Is your feature request related to a problem? Please describe.

Currently by the look of things (unless I'm not aware of such feature and how to enable it) to enable proper validation of a XML request body the body needs to be parsed from XML to a JSObject and the validation do then.

I am not sure what exactly is the best practice to approach this, but my temporary solution is to simply do like mentioned above, so, parse the request body via fast-xml-parser, perform the validation and then revert the body back to the original XML shape.
Does anyone have some better ideas?

Describe the solution you'd like

A best practice approach included in the express-openapi-validator (that can be enabled) that will automatically parse and validate the XML correctly according to the openapi spec.

Describe alternatives you've considered

Not built-in to express-openapi-validator body parsing viafast-xml-parser.

Additional context

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions