Home Reference Source Repository
public class | source

SwaggerWalk

SwaggerWalk utility to walk through paths, methods and definitions of a swagger specification.

Member Summary

Public Members
public

Store the swagger specification raw data

public

Store the swagger source.

Method Summary

Public Methods
public

loadSpec(source: string, cb: function)

Load a swagger specification from an URL or a filepath.

public

setSpec(spec: object): this

Set an object as the swagger specification we want to walk.

Public Members

public spec: object source

Store the swagger specification raw data

public specSource: string source

Store the swagger source. can be an url or filepath

Public Methods

public loadSpec(source: string, cb: function) source

Load a swagger specification from an URL or a filepath. TODO: read local fils

Params:

NameTypeAttributeDescription
source string

URL or filepath to the swagger specification

cb function

The callback

public setSpec(spec: object): this source

Set an object as the swagger specification we want to walk.

Params:

NameTypeAttributeDescription
spec object

the swagger specification as an object

Return:

this