fixed vendor extension conversion in parameters
@@ -556,9 +556,6 @@ public class SwaggerConverter implements SwaggerParserExtension {
else if(v2Parameter instanceof SerializableParameter) {
SerializableParameter sp = (SerializableParameter) v2Parameter;
- if(sp.getVendorExtensions() != null && sp.getVendorExtensions().size() > 0) {
- schema.setExtensions(sp.getVendorExtensions());
- }
if(sp.getEnum() != null) {
for(String e : sp.getEnum()) {
// TODO: use the proper method for enum items on schema
@@ -605,6 +602,10 @@ public class SwaggerConverter implements SwaggerParserExtension {
schema.setPattern(sp.getPattern());
}
+ if (sp.getVendorExtensions() != null && sp.getVendorExtensions().size() > 0) {
+ schema.setExtensions(sp.getVendorExtensions());
+ }
+
if(sp instanceof AbstractSerializableParameter) {
AbstractSerializableParameter ap = (AbstractSerializableParameter) sp;
schema.setDefault(ap.getDefault());
