Class SwaggerV20Library

java.lang.Object
com.atlassian.oai.validator.schema.SwaggerV20Library

public class SwaggerV20Library extends Object
Library that extends the JSON Schema v4 and adds the additional keywords introduced by the OpenAPI / Swagger v2.0 specification.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Message bundle loader that appends messages for the Swagger V20 extensions to the standard JSON Schema syntax bundle.
    static class 
    Message bundle loader that appends messages for the Swagger V20 extensions to the standard JSON Schema validation message bundle.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static com.github.fge.jsonschema.library.Library
    get()
     
    static com.github.fge.jsonschema.main.JsonSchemaFactory
     
    static com.github.fge.jsonschema.main.JsonSchemaFactory
    schemaFactory(com.github.fge.jsonschema.core.report.LogLevel logLevel, com.github.fge.jsonschema.core.report.LogLevel exceptionThreshold)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Method Details

    • get

      public static com.github.fge.jsonschema.library.Library get()
    • schemaFactory

      public static com.github.fge.jsonschema.main.JsonSchemaFactory schemaFactory()
      Returns:
      A JsonSchemaFactory instance configured with the OpenAPI / Swagger V20 metaschema library suitable for use in validating OpenAPI / Swagger documents
    • schemaFactory

      public static com.github.fge.jsonschema.main.JsonSchemaFactory schemaFactory(com.github.fge.jsonschema.core.report.LogLevel logLevel, com.github.fge.jsonschema.core.report.LogLevel exceptionThreshold)
      Parameters:
      logLevel - log level
      exceptionThreshold - exception threshold
      Returns:
      A JsonSchemaFactory instance configured with the OpenAPI / Swagger V20 metaschema library suitable for use in validating OpenAPI / Swagger documents