Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "lib/templates/index"

Index

Type aliases

PathName

PathName: string

Variables

Const debugLog

debugLog: Debugger = debug("api-client:scrape")

Const pathsT

pathsT: Traversal<OpenAPIObject, [PathName, PathItem]> = Lens.fromProp<OpenAPIObject>()("paths").composeIso(recordToArrayI<PathItem>()).composeTraversal(fromTraversable(array)<[PathName, PathItem]>())

Const serversO

serversO: Optional<OpenAPIObject, Server[]> = Optional.fromNullableProp<OpenAPIObject>()("servers")

Functions

Const create

  • create(openapiPath: string): Promise<types.RequestsTemplate>
  • Generate request generation template from OpenAPI schema.

    Parameters

    • openapiPath: string

      Path to OpenAPI schema

    Returns Promise<types.RequestsTemplate>

Const extractOps

  • extractOps(openapi: OpenAPIObject): types.RequestTemplate[]

Const extractOpsForPath

  • extractOpsForPath(__namedParameters: object): types.PartialRequestTemplate[]
  • Parameters

    • __namedParameters: object
      • pathItem: PathItem
      • pathName: string

    Returns types.PartialRequestTemplate[]

Const generateFrom

  • generateFrom(openapi: OpenAPIObject): types.RequestsTemplate

parseRequest

  • parseRequest(op: object): types.PartialRequestTemplate

Const readOpenAPI

  • readOpenAPI(openapiPath: string): Promise<OpenAPIObject>

Const recordToArrayI

  • recordToArrayI<T>(): Iso<Record<string, T>, Array<[string, T]>>

Generated using TypeDoc