ExampleBuilder generates examples from OpenAPIV3.ReferenceObject of OpenAPIV3.SchemaObject with auto detect examples, default value, enum value

if value has example it returns example

if value has default type instead example it returns default value

if value is enum, it returns first possible value

if value is integer returns 0

if value is boolean returns false

if value is string returns "string"

Hierarchy

Constructors

Properties

_options?: IRavageOptions

Methods

  • Get schema from openapi.components.schemas, if obj is OpenAPIV3.SchemaObject it returns obj, otherwise it search OpenAPIV3.SchemaObject

    Parameters

    Returns Promise<SchemaObject>

Generated using TypeDoc