So, I'm having trouble using an XML object definition with Swagger (Core 1.5.7). Here's my XML code:
<result status="ok">
<another>
<cards/>
<customer my_super_id="2349027834"/>
<someothers>
<someother name="who-is-this" />
</someothers>
</another>
</result>
And here's my yml code:
result:
type: object
description: Some random description
properties:
status:
type: string
xml:
attribute: true
another:
type: object
properties:
customer:
type: object
properties:
superId:
type: string
xml:
name: my_super_id
attribute: true
I can get the status
with no problem, but the my_super_id
is null
because Swagger is generating the model class with the parameter in CamelCase, i.e., mySuperId
instead of my_super_id
.
In my generated model class I have this:
public ResultAnotherCustomer(@JsonProperty("mySuperId") final String mySuperId)
Is there any way to solve this?