Postman collection generator.

For now it is not possible to only send files outside of object property (multipart). Well, at least not tried yet but it definitely doesn't work with alternatives

Implements

Constructors

Methods

  • Parameters

    • routes: RouteMeta[]

    Returns ProcessedRoute[]

    The added/updated routes

    import routing from '@novice1/routing';
    import { Postman } from '@novice1/api-doc-generator';

    const router = routing().post(...);
    const postman = new Postman();
    const routes = postman.add(router.getMeta());
    const { path, method, schema } = routes[0];
  • Parameters

    • routes: RouteMeta

    Returns ProcessedRoute[]

  • Parameters

    • event: EventObject

    Returns Postman

  • Parameters

    • name: string

    Returns Postman

  • Parameters

    • folder: Folder

    Returns Postman

  • Parameters

    • name: string

    Returns Postman

  • Parameters

    • folder: Folder

    Returns Postman

  • Parameters

    • folders: Folder[]

    Returns Postman

  • Parameters

    • host: string

    Returns Postman

  • Parameters

    • variable: Variable

    Returns Postman

  • Returns undefined | null | Auth

  • Returns string[]

  • Returns undefined | Auth

  • Returns undefined | Description

  • Returns undefined | EventObject[]

  • Returns Folder[]

  • Returns string[]

  • Returns InfoObject

  • Returns string

  • Returns undefined | string

  • Returns unknown

  • Returns undefined | string

  • Returns string

  • Returns undefined | Variable[]

  • Returns undefined | string | CollectionVersion

  • remove all routes

    Returns ProcessedRoute[]

    The removed routes

  • Returns undefined | Auth

  • Example:

    postman.setAuth({
    type: 'basic',
    basic: []
    });

    Parameters

    • auth: null | Auth

    Returns Postman

  • Example:

    postman.setAuth('basic', []);
    

    Parameters

    • type: string
    • Optionalauth: AuthAttribute[]

    Returns Postman

  • [[include:postman.setAuth.1.md]]

    Parameters

    • auth: BasePostmanAuthUtil

    Returns Postman

  • Parameters

    • consumes: string[]

    Returns Postman

  • [[include:postman.setDefaultSecurity.1.md]]

    Parameters

    • auth: BasePostmanAuthUtil

    Returns Postman

  • Example:

    postman.setDefaultSecurity({
    type: 'basic',
    basic: []
    });

    Parameters

    • auth: Auth

    Returns Postman

  • Example:

    postman.setDefaultSecurity('basic');
    

    Parameters

    • type: string

    Returns Postman

  • Parameters

    • description: Description

    Returns Postman

  • Parameters

    • eventList: EventObject[]

    Returns Postman

  • Parameters

    • folders: Folder[]

    Returns Postman

  • Parameters

    • host: string

    Returns Postman

  • Parameters

    • host: string[]

    Returns Postman

  • Parameters

    • info: InfoObject

    Returns Postman

  • Parameters

    • prop: string
    • v: unknown

    Returns Postman

  • Parameters

    • name: string

    Returns Postman

  • Parameters

    • postmanId: string

    Returns Postman

  • Parameters

    • protocolProfileBehavior: unknown

    Returns Postman

  • Parameters

    • v: string

    Returns Postman

  • Parameters

    • schema: string

    Returns Postman

  • Parameters

    • variableList: Variable[]

    Returns Postman

  • Parameters

    • version: undefined | string | CollectionVersion

    Returns Postman