Package io.openapiparser
Interface OpenApiResult
-
- All Known Implementing Classes:
OpenApiResult30,OpenApiResult31
public interface OpenApiResultOpenAPI parser result.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classOpenApiResult.Version
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> TgetModel(java.lang.Class<T> api)get the OpenAPI model.java.util.Collection<ValidationError>getValidationErrors()validation errors.OpenApiResult.VersiongetVersion()get the OpenAPIOpenApiResult.Versionof the OpenAPI description.booleanvalidate(io.openapiprocessor.jsonschema.validator.Validator validator, io.openapiprocessor.jsonschema.schema.SchemaStore schemaStore)run schema validation.
-
-
-
Method Detail
-
getVersion
OpenApiResult.Version getVersion()
get the OpenAPIOpenApiResult.Versionof the OpenAPI description.- Returns:
- the
OpenApiResult.Version
-
getModel
<T> T getModel(java.lang.Class<T> api)
get the OpenAPI model.Tmust be otherwise, it will throw anIllegalArgumentException- Type Parameters:
T- OpenAPI model type- Parameters:
api- class of the OpenAPI model- Returns:
- OpenAPI model
-
validate
boolean validate(io.openapiprocessor.jsonschema.validator.Validator validator, io.openapiprocessor.jsonschema.schema.SchemaStore schemaStore)run schema validation. Retrieve the collection of validation messages fromgetValidationErrors().- Parameters:
validator- json schema validatorschemaStore- json schema store- Returns:
- true if valid, else false
-
getValidationErrors
java.util.Collection<ValidationError> getValidationErrors()
validation errors.- Returns:
- the validation errors.
-
-