Skip to content

Latest commit

 

History

History

openapi

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

OpenAPI Connector

This connector extracts APIs from an OpenAPI Specification JSON. The following OAS versions are supported:

  • OpenAPI Specification 3.1.0
  • OpenAPI Specification 3.0.0
  • Swagger 2.0

Config File

Create a YAML config file based on the following template.

Required Configurations

Configure the connector by either

base_url: <url>  # BaseUrl for endpoints in OAS
openapi_json_path: <path>  # path to OAS JSON file

or

base_url: <url>  # BaseUrl for endpoints in OAS
openapi_json_url: <url>  # URL of OAS

Optional Configurations

If accessing the OAS JSON requires authentication, please include an optional auth configuration.

auth:
  basic_auth:
    user: <user>
    password: <password>

Output Destination

See Output Config for more information on the optional output config.

Testing

Follow the installation instructions to install metaphor-connectors in your environment (or virtualenv). Make sure to include the openapi or all extra.

Run the following command to test the connector locally:

metaphor openapi <config_file>

Manually verify the output after the run finishes.