swagger-core icon indicating copy to clipboard operation
swagger-core copied to clipboard

Missing Model Objects for Swagger 2.0

Open jrymal opened this issue 12 years ago • 1 comments

I've noticed that there are several holes in the model implementation when compared to the Swagger 2.0 Spec. I've been able to work around many of them with overrides and fasterxml JSON annotations. The only one I've been having an issue with are setting a value for a header parameter. The deserializer on Parameter prevents setting the "in" property via an override.

So I'm looking for a way to set either "default" (or "enum") on the header parameter (there are also a wide variety of attributes specified in the 2.0.md which are missing).

Things I've been able to work around (but would be nice to see fixed): Swagger.java

  • responses
  • security (security definition works well)

Property.java

  • lacks much of the JSON V4 schema values (examples include min/maxitems; I find this is similar to the list of header parameterswhich are missing)
  • maps of properties are missing
  • additional properties on anything that is not a list

Operation.java

  • references to responses in the swagger object

In addition to these object issues, it seems that in most places where the Swagger Spec specifies default values, the model is not hiding the value if it is the defined default.

jrymal avatar Nov 04 '14 17:11 jrymal

I believe this support has caught up in the develop_2.0 branch

fehguy avatar Mar 11 '15 23:03 fehguy