Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

oas-schema-walker

Mermade8mBSD-3-Clause1.1.5

Library to walk OAS 3 schema objects and call a callback

openapi, swagger, oas, schema, json-schema

readme

OAS-Schema-Walker

Functions

getDefaultState()

obtains the default starting state for the state object used by walkSchema

walkSchema(parent, state, callback,)

begins the walk of a schema object, or the state object used by walkSchema

getDefaultState() ⇒

obtains the default starting state for the state object used by walkSchema

Kind: global function Returns: the state object suitable for use in walkSchema

walkSchema(parent, state, callback,) ⇒

begins the walk of a schema object, or the state object used by walkSchema

Kind: global function Returns: the schema object

Param Description
parent the parent schema, if any. Use empty object if none
state the initial starting state of the walker, usually obtained from getDefaultState
callback, a function taking a schema, parent and state to be called on this and all subschemas

changelog

Change Log

swagger2openapi v6.1.0 and oas-resolver v2.4.0

New properties on the options object:

  • fetch - to override the built-in fetch function
  • fetchOptions - additional options to be passed to the fetch function

swagger2openapi v6.0.0 and oas-validator v4.0.0

  • Converter will now error out if passed in input containing YAML anchors/aliases. To bypass this check, pass the --anchors option or set options.anchors to true.
  • Validator method validateSync has now been renamed validateInner as it (still) returns a Promise or calls a given callback.