OAI / OpenAPI-Style-Guide

How to (and how not to) refer to the OAI in meetups, interviews, casual conversations, the settling of bar bets, and for conference presentations.
Apache License 2.0
210 stars 45 forks source link

No XML attribute generated for attribute #4

Closed JoopBL closed 7 years ago

JoopBL commented 7 years ago

I have the following XML: `

` The corresponding Java class has ben generated using xjc: `@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "CancelRequest", propOrder = { "orderID" }) @XmlRootElement(name = "CancelRequest") public class CancelRequest implements Serializable, ToString { private final static long serialVersionUID = -1L; @XmlElement(name = "OrderID", required = true) protected String orderID; @XmlAttribute(name = "version") protected String version; rest of class are getters and setters` The code generated by Swagger is ` "CancelRequest": { "type": "object", "required": [ "orderID" ], "properties": { "orderID": { "type": "string", "xml": { "name": "OrderID" } }, "version": { "type": "string" } }, "xml": { "name": "CancelRequest" } },` There are no XML Object values generated for version. I would have expected here: ` "xml": { "attribute":true }` Since version is an attribute.
fehguy commented 7 years ago

Looks to me like this should be opened on swagger-core, which is an implementation of the spec.