【发布时间】:2019-11-06 10:39:51
【问题描述】:
无法使用 JsonSchemaValidator。请帮助解决此错误。或者它可能是库错误? 我的测试代码:
Response resp = given().cookie(cookie).when().get(getEndpointLink("link_menuItems"));
resp.then().assertThat().body(matchesJsonSchemaInClasspath("jsonSchema.json"));
依赖关系:
compile group: 'io.rest-assured', name: 'json-schema-validator', version: '4.1.2'
compile group: 'com.github.fge', name: 'json-schema-core', version: '1.2.5'
compile group: 'com.github.fge', name: 'json-schema-validator', version: '2.2.6'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.10.0'
compile group: 'com.github.fge', name: 'jackson-coreutils', version: '1.8'
错误:
java.lang.IncompatibleClassChangeError: Found class com.github.fge.jsonschema.main.JsonSchema, but interface was expected
【问题讨论】:
标签: java json rest-assured json-schema-validator