Class/Object

de.leanovate.swaggercheck

SwaggerChecks

Related Docs: object SwaggerChecks | package swaggercheck

Permalink

case class SwaggerChecks(swaggerAPI: SwaggerAPI, stringFormats: Map[String, GeneratableFormat[String]] = StringFormats.defaultFormats, integerFormats: Map[String, GeneratableFormat[BigInt]] = IntegerFormats.defaultFormats, numberFormats: Map[String, GeneratableFormat[BigDecimal]] = NumberFormats.defaultFormats, maxItems: Int = 10) extends GeneratableSchema with Product with Serializable

Facade for all swagger related generators and verifiers.

swaggerAPI

the swagger API

stringFormats

map of all string formats

integerFormats

map of all integer formats

numberFormats

map of all number formats

maxItems

default maximum number of items in arrays (or objects with additionalProperties) might be overriden be minItems or maxItems in swagger file

Linear Supertypes
Serializable, Serializable, Product, Equals, GeneratableSchema, Schema, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. SwaggerChecks
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. GeneratableSchema
  7. Schema
  8. AnyRef
  9. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SwaggerChecks(swaggerAPI: SwaggerAPI, stringFormats: Map[String, GeneratableFormat[String]] = StringFormats.defaultFormats, integerFormats: Map[String, GeneratableFormat[BigInt]] = IntegerFormats.defaultFormats, numberFormats: Map[String, GeneratableFormat[BigDecimal]] = NumberFormats.defaultFormats, maxItems: Int = 10)

    Permalink

    swaggerAPI

    the swagger API

    stringFormats

    map of all string formats

    integerFormats

    map of all integer formats

    numberFormats

    map of all number formats

    maxItems

    default maximum number of items in arrays (or objects with additionalProperties) might be overriden be minItems or maxItems in swagger file

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def arbitraryArray: Gen[CheckJsValue]

    Permalink
    Definition Classes
    GeneratableSchema
  5. def arbitraryObj: Gen[CheckJsValue]

    Permalink
    Definition Classes
    GeneratableSchema
  6. def arbitraryProperty: Gen[(String, CheckJsValue)]

    Permalink
    Definition Classes
    GeneratableSchema
  7. def arbitraryValue: Gen[CheckJsValue]

    Permalink
    Definition Classes
    GeneratableSchema
  8. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  9. def childContext: SwaggerChecks

    Permalink

    Create a child context with reduced maxItems.

    Create a child context with reduced maxItems.

    Mostly used internally to ensure that size of arrays decay with depth.

    Definition Classes
    SwaggerChecks → GeneratableSchema
  10. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. def findByRef(ref: String): Option[Definition]

    Permalink
    Definition Classes
    SwaggerChecks → Schema
  14. def findGeneratableIntegerFormat(format: String): Option[GeneratableFormat[BigInt]]

    Permalink
    Definition Classes
    SwaggerChecks → GeneratableSchema
  15. def findGeneratableNumberFormat(format: String): Option[GeneratableFormat[BigDecimal]]

    Permalink
    Definition Classes
    SwaggerChecks → GeneratableSchema
  16. def findGeneratableStringFormat(format: String): Option[GeneratableFormat[String]]

    Permalink
    Definition Classes
    SwaggerChecks → GeneratableSchema
  17. def findIntegerFormat(name: String): Option[ValueFormat[BigInt]]

    Permalink
    Definition Classes
    GeneratableSchema → Schema
  18. def findNumberFormat(name: String): Option[ValueFormat[BigDecimal]]

    Permalink
    Definition Classes
    GeneratableSchema → Schema
  19. def findStringFormat(name: String): Option[ValueFormat[String]]

    Permalink
    Definition Classes
    GeneratableSchema → Schema
  20. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  21. val integerFormats: Map[String, GeneratableFormat[BigInt]]

    Permalink

    map of all integer formats

  22. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  23. def jsonGenerator(name: String): Gen[CheckJsValue]

    Permalink

    Create a generator for random json based on a swagger definition.

    Create a generator for random json based on a swagger definition.

    Usually you want to use this to ensure that all your deserializers are working.

    name

    name of the swagger definition

    returns

    generator for json

  24. def jsonVerifier(name: String): Validator[String]

    Permalink

    Get a verifier that verifies, if a string contains a json that matches to a swagger definition.

    Get a verifier that verifies, if a string contains a json that matches to a swagger definition.

    Usually you want to use this to ensure that all your serializers are working.

    name

    name of the swagger definition to check

    returns

    a string verifier

  25. val maxItems: Int

    Permalink

    default maximum number of items in arrays (or objects with additionalProperties) might be overriden be minItems or maxItems in swagger file

    default maximum number of items in arrays (or objects with additionalProperties) might be overriden be minItems or maxItems in swagger file

    Definition Classes
    SwaggerChecks → GeneratableSchema
  26. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  27. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  28. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  29. val numberFormats: Map[String, GeneratableFormat[BigDecimal]]

    Permalink

    map of all number formats

  30. def operationVerifier[R, U](pathFilter: (String) ⇒ Boolean = _ => true)(implicit requestBuilder: RequestCreator[R], responseExtractor: ResponseExtractor[U]): Gen[OperationValidator[R, U]]

    Permalink

    Combines requestGenerator and responseVerifier.

    Combines requestGenerator and responseVerifier.

    Convenient way to generate arbitrary requests together with a verifier of their expected responses.

    R

    request class

    U

    response class

    pathFilter

    Optional filter for paths (exact match)

  31. def requestGenerator[R](pathFilter: (String) ⇒ Boolean = _ => true)(implicit requestBuilder: RequestCreator[R]): Gen[R]

    Permalink

    Create a generator for requests based on a swagger file.

    Create a generator for requests based on a swagger file.

    R

    request class (depends on the web framework, in play FakeRequest might be desired)

    pathFilter

    Optional filter for paths (exact match)

    requestBuilder

    implicit creator for request instances

    returns

    generator for requests

  32. def responseVerifier[R](method: String, path: String)(implicit responseExtractor: ResponseExtractor[R]): Validator[R]

    Permalink

    Create response verifier.

    Create response verifier.

    R

    response class (depends on the web framework)

    method

    method of request

    path

    path of request

    responseExtractor

    implicit extractor for response instances

  33. val stringFormats: Map[String, GeneratableFormat[String]]

    Permalink

    map of all string formats

  34. val swaggerAPI: SwaggerAPI

    Permalink

    the swagger API

  35. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  36. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. def withIntegerFormats(formats: (String, GeneratableFormat[BigInt])*): SwaggerChecks

    Permalink

    Add a self-defined integer format.

  40. def withMaxItems(newMaxItems: Int): SwaggerChecks

    Permalink

    Modify max items.

    Modify max items.

    Definition Classes
    SwaggerChecks → GeneratableSchema
  41. def withNumberFormats(formats: (String, GeneratableFormat[BigDecimal])*): SwaggerChecks

    Permalink

    Add a self-defined number format.

  42. def withStringFormats(formats: (String, GeneratableFormat[String])*): SwaggerChecks

    Permalink

    Add a self-defined string format.

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from GeneratableSchema

Inherited from Schema

Inherited from AnyRef

Inherited from Any

Ungrouped