Options
All
  • Public
  • Public/Protected
  • All
Menu

"src/index"

Index

Variables

PromiseConstructor

PromiseConstructor: any

Functions

asFragment

getLanguageElementByRuntimeType

isFragment

loadApi

  • Load API asynchronously. The Promise is rejected with ApiLoadingError if the resulting Api contains errors and the 'rejectOnErrors' option is set to 'true'.

    Parameters

    • apiPath: string

      Path to API: local file system path or Web URL

    • Optional options: Options

      Load options

    Returns Promise<Api | Api>

    Promise<Api>.

  • Load API asynchronously. The Promise is rejected with ApiLoadingError if the resulting Api contains errors and the 'rejectOnErrors' option is set to 'true'.

    Parameters

    • apiPath: string

      Path to API: local file system path or Web URL

    • extensionsAndOverlays: string[]

      Paths to extensions and overlays to be applied listed in the order of application. Relevant for RAML 1.0 only.

    • Optional options: Options

      Load options

    Returns Promise<Api | Api>

    Promise<Api>.

loadApiSync

  • loadApiSync(apiPath: string, options?: Options): Api | Api
  • loadApiSync(apiPath: string, extensionsAndOverlays: string[], options?: Options): Api | Api
  • Load API synchronously. If the 'rejectOnErrors' option is set to true, ApiLoadingError is thrown for Api which contains errors.

    Parameters

    • apiPath: string

      Path to API: local file system path or Web URL

    • Optional options: Options

      Load options

    Returns Api | Api

    Api instance.

  • Load API synchronously. If the 'rejectOnErrors' option is set to true, ApiLoadingError is thrown for Api which contains errors.

    Parameters

    • apiPath: string

      Path to API: local file system path or Web URL

    • extensionsAndOverlays: string[]

      Paths to extensions and overlays to be applied listed in the order of application. Relevant for RAML 1.0 only.

    • Optional options: Options

      Load options

    Returns Api | Api

    Api instance.

loadRAML

  • Load RAML asynchronously. May load both Api and Typed fragments. The Promise is rejected with ApiLoadingError if the resulting RAMLLanguageElement contains errors and the 'rejectOnErrors' option is set to 'true'.

    Parameters

    • ramlPath: string

      Path to RAML: local file system path or Web URL

    • extensionsAndOverlays: string[]

      Paths to extensions and overlays to be applied listed in the order of application. Relevant for RAML 1.0 only.

    • Optional options: Options

      Load options

    Returns Promise<BasicNode>

    Promise<RAMLLanguageElement>.

loadRAMLSync

  • loadRAMLSync(ramlPath: string, extensionsAndOverlays: string[], options?: Options): BasicNode
  • Load RAML synchronously. May load both Api and Typed fragments. If the 'rejectOnErrors' option is set to true, ApiLoadingError is thrown for RAML which contains errors.

    Parameters

    • ramlPath: string

      Path to RAML: local file system path or Web URL

    • extensionsAndOverlays: string[]

      Paths to extensions and overlays to be applied listed in the order of application. Relevant for RAML 1.0 only.

    • Optional options: Options

      Load options

    Returns BasicNode

    RAMLLanguageElement instance.

optionsForContent

  • optionsForContent(content: string, arg2?: Options, filePath?: any): Options

parseRAML

  • Load RAML asynchronously. May load both Api and Typed fragments. If the 'rejectOnErrors' option is set to true, ApiLoadingError is thrown for RAML which contains errors.

    Parameters

    • content: string

      content of the raml

    • Optional arg2: Options

    Returns Promise<BasicNode>

    RAMLLanguageElement instance.

parseRAMLSync

  • Load RAML synchronously. May load both Api and Typed fragments. If the 'rejectOnErrors' option is set to true, ApiLoadingError is thrown for RAML which contains errors.

    Parameters

    • content: string

      content of the raml

    • Optional arg2: Options

    Returns BasicNode

    RAMLLanguageElement instance.

Generated using TypeDoc