Class SwaggerMatchers
java.lang.Object
com.atlassian.oai.validator.mockmvc.SwaggerMatchers
Deprecated.
Factory for OpenAPI / Swagger assertions.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDeprecated. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.test.web.servlet.ResultMatcherDeprecated.UseOpenApiMatchers.isValid(String)instead
-
Constructor Details
-
SwaggerMatchers
public SwaggerMatchers()Deprecated.
-
-
Method Details
-
isValid
Deprecated.UseOpenApiMatchers.isValid(String)insteadAssert the result can be validated against the given Swagger v2 or OpenAPI v3 specification.The 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\", ...}")- Parameters:
specUrlOrPayload- The location of the Swagger JSON specification to use in the validator.
-
OpenApiMatchers