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

Runtime incompatibility - NoSuchMethodError

Open joshdanhall opened this issue 4 years ago • 1 comments
trafficstars

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! :)

joshdanhall avatar Feb 05 '21 00:02 joshdanhall

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.

janpacuski avatar Aug 12 '21 14:08 janpacuski