OpenAPI spec loader¶
The OpenAPI spec loader package will crawl API definitions from an OpenAPI JSON specification and load corresponding APISpec
and APIPath
assets in Atlan.
Configuration¶
- Specification URL: full URL to the JSON form of the OpenAPI specification.
- Connection: either details for a new connection (name and admins), or details of an existing connection to reuse.
What it does¶
Connection¶
If during setup you requested a new connection be created, that connection (with the requested admins) will be created.
APISpec¶
A single APISpec
asset will be created representing the entire JSON specification file provided in the setup. The APISpec
asset will be created within the connection being reused, or the one created (above). The following properties will be populated on the APISpec
asset, if present in the JSON:
Attribute | Atlan UI | Source in JSON |
---|---|---|
name |
Name | info.title |
description |
Description | info.description |
apiSpecType |
Spec Type | openapi |
apiSpecTermsOfServiceURL |
Terms of Service | info.termsOfService |
apiSpecContactEmail |
N/A | info.contact.email |
apiSpecContactName |
N/A | info.contact.name |
apiSpecContactURL |
N/A | info.contact.url |
apiSpecLicenseName |
N/A | info.license.name |
apiSpecLicenseURL |
License | info.license.url |
sourceURL |
View in API (button) | URL of JSON file |
apiSpecVersion |
N/A | info.version |
apiExternalDoc.url |
N/A | externalDocs.url |
apiExternalDoc.description |
External Docs | externalDocs.description |
APIPaths¶
One APIPath
asset will be created for each unique path defined in the JSON specification (under paths
in the JSON). Each APIPath
will be populated with the following properties, if present in the JSON:
Attribute | Atlan UI | Source in JSON |
---|---|---|
name |
Name | paths[].{url} |
description |
Description | A markdown table composed of paths[].{operation} and paths[].{operation}.summary . |
apiPathRawURI |
Raw URI | paths[].{url} |
apiPathSummary |
N/A | paths[].summary |
apiPathAvailableOperations |
Methods | paths[].{operation} |
apiPathIsTemplated |
Is Templated? | True if paths[].{url} contains { and } , otherwise false. |
How it works
- Creates or validates the existing connection exists, depending on which was provided in the setup.
- Pulls the JSON specification from the provided URL using Swagger's library.
- Translates the JSON specification into an object form that is easily parsed through code, again using Swagger's library.
- Creates the
APISpec
asset. - Iterates through the
paths
in the JSON to create anAPIPath
asset for each one.