OpenApiMatchers@Deprecated public class SwaggerMatchers extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
SwaggerMatchers.SwaggerValidationException
Deprecated.
|
| Constructor and Description |
|---|
SwaggerMatchers()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
org.springframework.test.web.servlet.ResultMatcher |
isValid(String specUrlOrPayload)
Deprecated.
Use
OpenApiMatchers.isValid(String) instead |
public org.springframework.test.web.servlet.ResultMatcher isValid(String specUrlOrPayload)
OpenApiMatchers.isValid(String) insteadThe specification can be provided as a URL or an inline spec in JSON or YAML format.
A URL can be an absolute HTTP/HTTPS URL, a File URL or a classpath location (without the classpath: scheme).
For example:
// Create from a publicly hosted HTTP location
.isValid("http://api.myservice.com/swagger.json")
// Create from a file on the local filesystem
.isValid("file://Users/myuser/tmp/api.yaml");
// Create from a classpath resource in the /api package
.isValid("/api/swagger.json");
// Create from a swagger JSON payload
.isValid("{\"swagger\": \"2.0\", ...}")
specUrlOrPayload - The location of the Swagger JSON specification to use in the validator.Copyright © 2016–2020 Atlassian. All rights reserved.