Skip to content

Define multiple namespace and prefixes for XML requests #1456

@tim-ebner

Description

@tim-ebner

Hi everyone,

I try to model a request which requires xml as request body and multiple namespaces in one xml element:
example:

<Song	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
			xmlns="http://example.com/Song"
			xmlns:art="http://www.example.com/Artist"
			xsi:schemaLocation="http://www.example.com/Song Song.xsd">
</Song>

I'm currently only able to define just one namespace:

Song:
  type: object
  xml:
    namespace: http://example.com/Song
  properties:
  ....

I think a possible workaround is to declare the other namespace attributes as normal elements and use "attribute: true".
I'm sorry if I misunderstand the usage of namespaces or the openapi xml element.

Is there a proper way to define multiple xml namespaces for one attribute in openapi 3.0.0?

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