Skip to main content

OpenAPI

With Port, you can import and display OpenAPI specification files as Swagger UI tabs.

By using a special Open API Blueprint property, Port will display the Swagger UI matching the spec file provided in the specific entity page. In addition, it will also provide advanced functionality such as performing HTTP calls to the spec target directly from Port.

Definitionโ€‹

When using the URL format, Port will query the provided URL for the OpenAPI spec and expects a JSON OpenAPI spec

note

When using URL for the open-api display please make sure that your server allows cross-origin (CORS) requests from app.getport.io

{
"myOpenApi": {
"title": "My Open API",
"type": "string",
"format": "url",
"spec": "open-api",
"description": "Open-API Prop"
}
}

Exampleโ€‹

Here is how the Swagger tab in the specific entity page appears when an OpenAPI spec is provided:

OpenAPI Example