Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example for Wrapped Xml array elements is generated incorrectly #4274

Open
SariAlalem opened this issue Mar 1, 2018 · 2 comments
Open

Example for Wrapped Xml array elements is generated incorrectly #4274

SariAlalem opened this issue Mar 1, 2018 · 2 comments

Comments

@SariAlalem
Copy link

SariAlalem commented Mar 1, 2018

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>
@SariAlalem SariAlalem changed the title Example for Wrapped Xml elements are generated incorrectly Example for Wrapped Xml array elements is generated incorrectly Mar 3, 2018
@quetzalcoatl
Copy link

Maybe related: https://stackoverflow.com/q/53216295/717732

@tuffnatty
Copy link

Looks like a duplicate of #2907.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants