Package org.mockserver.openapi
Class OpenAPIParser
- java.lang.Object
-
- org.mockserver.openapi.OpenAPIParser
-
public class OpenAPIParser extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static StringOPEN_API_LOAD_ERROR
-
Constructor Summary
Constructors Constructor Description OpenAPIParser()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static io.swagger.v3.oas.models.OpenAPIbuildOpenAPI(String specUrlOrPayload, MockServerLogger mockServerLogger)static voidclearCache(String specUrlOrPayload)static booleanisSpecUrl(String specUrlOrPayload)Helper function that checks if the provided string is a reference to an API specification filestatic List<org.apache.commons.lang3.tuple.Pair<String,io.swagger.v3.oas.models.Operation>>mapOperations(io.swagger.v3.oas.models.PathItem pathItem)
-
-
-
Field Detail
-
OPEN_API_LOAD_ERROR
public static final String OPEN_API_LOAD_ERROR
- See Also:
- Constant Field Values
-
-
Method Detail
-
clearCache
public static void clearCache(String specUrlOrPayload)
-
isSpecUrl
public static boolean isSpecUrl(String specUrlOrPayload)
Helper function that checks if the provided string is a reference to an API specification file- Parameters:
specUrlOrPayload- - string that might contain an API specification file reference- Returns:
- true if the provided string ends with special file suffix
-
buildOpenAPI
public static io.swagger.v3.oas.models.OpenAPI buildOpenAPI(String specUrlOrPayload, MockServerLogger mockServerLogger)
-
-