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
Create a YAML config file based on the following template.
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
If accessing the OAS JSON requires authentication, please include an optional auth configuration.
auth:
basic_auth:
user: <user>
password: <password>
See Output Config for more information on the optional output
config.
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.