Feature | API Designer | Tyk Dashboard API | Tyk Gateway API |
---|---|---|---|
Work with YAML format | ✅ | ✅ | ❌ |
Work with JSON format | ✅ | ✅ | ✅ |
Import an OpenAPI description | ✅ | ✅ | ✅ |
Import a complete Tyk OAS API definition | ✅ | ✅ | ✅ |
Import multi-part OpenAPI descriptions | ✅ | ✅ | ❌ |
Apply API Templates | ✅ | ✅ | ❌ |
Export the OpenAPI description | ✅ | ✅ | ✅ |
Export the Tyk OAS API definition | ✅ | ✅ | ✅ |
Update API with new OpenAPI description | ✅ | ✅ | ✅ |
Manage API versions | ✅ | ✅ | ✅ |
Assign APIs to Categories | ✅ | ✅ | ❌ |
Assign API Owners | ✅ | ✅ | ❌ |
servers
section in the imported OpenAPI description, adding the base path URL to which requests should be sent to access the new API. It will take the existing entry and use this to generate the upstream (target) URL if none is provided.
/
and if you do not provide an upstream URL, Tyk will use the first value provided in the servers.url section in the OpenAPI description.
Middleware | OpenAPI data used for configuration |
---|---|
Request validation | Endpoints that have requestBody or schema |
Mock response | Endpoints with examples or schema |
Client authentication | Defined in security and securitySchemes |
Allow list | Restrict access only to declared endpoint paths |
servers.url
section of the OpenAPI description to determine if it already contains a valid API base path.
servers.url
is an address on the Tyk Gateway, then this is considered a valid API base path.servers.url
is the address of the upstream service - and so will use this as the upstream (target) URL for the API proxy. If there are multiple entries in servers.url
Tyk will only consider the first entry and ignore all others.servers
entry contains a parameterised URL, Tyk will fill in the parameters with the values provided in the variables
associated with that entry.
Setting the API Base Path
If the servers.url
section did not contain a valid API base path then Tyk will insert a new entry in the first location in servers.url
with a valid API base path comprising the Tyk Gateway address plus the listen path for the API.
For example, given the following fragment of the OpenAPI description and importing to a Tyk Gateway at https://my-gateway.com
specifying a listen path of my-api
:
servers
section of the OpenAPI description.
Tyk does not support relative URLs
If the first entry is a relative URL, or another format that Tyk cannot process, the import will fail with an error.
For example attempting to import an OpenAPI description containing this configuration:
$ref
keyword.
This allows you to share snippets of the API definition across multiple APIs, or to have specific ownership of elements of the API configuration owned by different teams.
From Tyk 5.8.0 there is full support for these multi-part OpenAPI documents with Tyk Dashboard.
We consider two different types of file containing these OpenAPI descriptions:
info
section$ref
)x-tyk-api-gateway
).
You can alternatively work on the full Tyk OAS API definition outside Tyk and update your existing API proxy with the new configuration, without having to create a new version of the API.
Middleware | OpenAPI data used for configuration |
---|---|
Request validation | Endpoints that have requestBody or schema |
Mock response | Endpoints with examples or schema |
Client authentication | Defined in security and securitySchemes |
Allow list | Restrict access only to declared endpoint paths |