Skip to content

cannot describe a typical XML-based REST API in OpenAPI/Swagger #1303

Closed
@abstratt

Description

@abstratt

I cannot describe a XML request/response that has different elements typed by the same complex type. That should be possible, as it is common practice in XML modeling (typically using XSD schemas).

Simple example: a customer has a billing address (element name: billing-address) and a residential address (residential-address).

Reasons:

  • in order to reuse a complex type, in OpenAPI I must create a definition object, and refer to this definition in the $ref field in the body of request/response
  • in order to declare the name, namespace, prefix and other XML-specific metadata in OpenAPI, I must declare a XMLobject (via a "xml" field)
  • however, as per the spec, whenever you use $ref, other values are ignored, IOW, I cannot define the name/namespace/prefix of the XML element

See swagger-api/swagger-ui#3469 and #556.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions