I have an question about XML schema on Swagger Editor or UI.
I tried to create an element like below, but it have failed.
<CompanyName Code='1' CodeContext='context'>example</CompanyName>
i try using that on swagger UI:
CompanyName:
xml:
name: CompanyName
enum: [example]
properties:
Code:
type: string
enum: [1]
xml:
attribute: true
CodeContext:
type: string
enum: [context]
xml:
attribute: true
But the out was :
<CompanyName>example</CompanyName>
the attributes does not appears
What's wrong with that?
It’s been a while, so I’m not 100% certain, but I believe there’s no way to describe your example.
You can end up with either:
<CompanyName>example</CompanyName>
or
<CompanyName Code=’1’ CodeContext=’context’/>
This is not a tooling issue, the spec doesn’t support your case.
--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.