Skip to content

how can I use a spec file which only available local #1471

Closed
@jinchenbravo

Description

@jinchenbravo

Q&A

  • OS: [macOS]
  • Environment: [Node.js v10.0.0]
  • Method of installation: [npm]
  • Swagger-Client version: [3.9.4]
  • Swagger/OpenAPI version: [OpenAPI 3.0]

How can we help?

For some authentication reason , the spec file can only be downloaded from somewhere to local,
and I need to use Swagger-Client to read the spec file and send the request to a remote host.
Looks like I must use url : http.... to get the client

Swagger({ url: "http://petstore.swagger.io/v2/swagger.json" }).then((client) => { ...

so the question is there a solution to read the spec from local ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions