Package io.openapiparser
Class OpenApiResult31
- java.lang.Object
-
- io.openapiparser.OpenApiResult31
-
- All Implemented Interfaces:
OpenApiResult
public class OpenApiResult31 extends java.lang.Object implements OpenApiResult
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.openapiparser.OpenApiResult
OpenApiResult.Version
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringOPENAPI_SCHEMADeprecated.
-
Constructor Summary
Constructors Constructor Description OpenApiResult31(Context context, io.openapiprocessor.jsonschema.schema.Bucket root)Deprecated.OpenApiResult31(Context context, io.openapiprocessor.jsonschema.schema.Bucket root, io.openapiprocessor.jsonschema.schema.DocumentStore documents)
-
Method Summary
All Methods Instance Methods Concrete 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.
-
-
-
Field Detail
-
OPENAPI_SCHEMA
@Deprecated public static final java.lang.String OPENAPI_SCHEMA
Deprecated.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
OpenApiResult31
@Deprecated public OpenApiResult31(Context context, io.openapiprocessor.jsonschema.schema.Bucket root)
Deprecated.
-
OpenApiResult31
public OpenApiResult31(Context context, io.openapiprocessor.jsonschema.schema.Bucket root, io.openapiprocessor.jsonschema.schema.DocumentStore documents)
-
-
Method Detail
-
getVersion
public OpenApiResult.Version getVersion()
Description copied from interface:OpenApiResultget the OpenAPIOpenApiResult.Versionof the OpenAPI description.- Specified by:
getVersionin interfaceOpenApiResult- Returns:
- the
OpenApiResult.Version
-
getModel
public <T> T getModel(java.lang.Class<T> api)
Description copied from interface:OpenApiResultget the OpenAPI model.Tmust be otherwise, it will throw anIllegalArgumentException- Specified by:
getModelin interfaceOpenApiResult- Type Parameters:
T- OpenAPI model type- Parameters:
api- class of the OpenAPI model- Returns:
- OpenAPI model
-
validate
public boolean validate(io.openapiprocessor.jsonschema.validator.Validator validator, io.openapiprocessor.jsonschema.schema.SchemaStore schemaStore)Description copied from interface:OpenApiResultrun schema validation. Retrieve the collection of validation messages fromOpenApiResult.getValidationErrors().- Specified by:
validatein interfaceOpenApiResult- Parameters:
validator- json schema validatorschemaStore- json schema store- Returns:
- true if valid, else false
-
getValidationErrors
public java.util.Collection<ValidationError> getValidationErrors()
Description copied from interface:OpenApiResultvalidation errors.- Specified by:
getValidationErrorsin interfaceOpenApiResult- Returns:
- the validation errors.
-
-