Skip to content

Example for Wrapped Xml array elements is generated incorrectly #4274

Open
@SariAlalem

Description

@SariAlalem

SwaggerUI 3.11.0
This issue was reported previously and resolved, but seems it's back:
#2577

Q A
Bug or feature request? Bug
Which Swagger/OpenAPI version? Tried both 2.0 and OpenApi 3.0
Which Swagger-UI version? 3.11.0
How did you install Swagger-UI? Hosted on my local machine
Which browser & version? Chrome 63.0
Which operating system? Windows 10

Demonstration API definition

https://integration.test-freightos.com/api-docs/docs-aggregator/lufthansa/Availability

My use case:

...
"masterConsignments": {
            "xml": {
              "wrapped": true
            },
            "type": "array",
            "items": {
              "xml": {
                "name": "masterConsignment"
              },
              "$ref": "#/components/schemas/AvailabilityMasterConsignmentReq"
            }
          }
...

Actual example output:

<masterConsignments>
		<masterConsignments>
			<product>
				....
			</product>
		</masterConsignments>
</masterConsignments>

Expected example output:

<masterConsignments>
		<masterConsignment>
			<product>
				....
			</product>
		</masterConsignment>
</masterConsignments>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions