fixed parameter reference conversion
@@ -551,7 +551,14 @@ public class SwaggerConverter implements SwaggerParserExtension {
Schema schema = null;
if(v2Parameter instanceof RefParameter) {
- schema = new Schema().$ref(((RefParameter) v2Parameter).get$ref());
+
+ RefParameter ref = (RefParameter) v2Parameter;
+ if(ref.get$ref().indexOf("#/parameters") == 0) {
+ String updatedRef = "#/components/parameters" + ref.get$ref().substring("#/parameters".length());
+ ref.set$ref(updatedRef);
+ }
+
+ v3Parameter.set$ref(ref.get$ref());
}
else if(v2Parameter instanceof SerializableParameter) {
SerializableParameter sp = (SerializableParameter) v2Parameter;
