Sayi / swagger-diff

:ski: Compare two swagger API specifications(1.x or v2.0)
http://deepoove.com/swagger-diff/
Apache License 2.0
273 stars 85 forks source link

Runtime incompatibility - NoSuchMethodError #41

Open joshdanhall opened 3 years ago

joshdanhall commented 3 years ago

The following line of code results in NoSuchMethodError:- com.deepoove.swagger.diff.compare.ParameterDiff

    private Property mapToProperty(Parameter rightPara) {
        Property prop = new StringProperty();
        prop.setAccess(rightPara.getAccess());
        prop.setAllowEmptyValue(rightPara.getAllowEmptyValue());
        prop.setDescription(rightPara.getDescription());
        prop.setName(rightPara.getName());
        prop.setReadOnly(rightPara.isReadOnly());
        prop.setRequired(rightPara.getRequired());
        return prop;
    }

The offending call is rightPara.getAllowEmptyValue() where rightPara is of type io.swagger.models.parameters.Parameter, imported from io.swagger:swagger-models. I have trawled the versions of that module and cannot find one that is compatible (i.e. has the method getAllowEmptyValue()). Help please!! Other than this, I'm really loving this tool! :)

janpacuski commented 3 years ago

This project is using swagger-models 1.5.15, while most recent version of swagger-models from the swagger-core is 1.62. It's probably a little late for a replay, but maybe someone will need this hint later.