Open jeffesp opened 1 month ago
Hi @jeffesp,
If you're not using Tyk Dashboard, then is is exactly what you need to do.
To shorten the process, you could create the child API first so that you can directly add its API Id to the versioning info of the Base API on creation. We recommend that you set the child API to internal (state.internal=true
) so that it cannot be called directly, only via the Base API.
Note that you can manually select an API Id when you create the child API by providing a value in x-tyk-api-gateway.info.id
in the API definition that you provide to Tyk (if this field is left empty then Tyk will automatically assign a value).
The Example Base API on the page that you linked shows the fields that you must configure in the API definition for your Base API
x-tyk-api-gateway.info.id
) allocated to the child APIWhen you use the PATCH mechanism, this will update the OpenAPI description part of the Tyk OAS API based on the OpenAPI document you provide in the PATCH request. The versioning data is stored in the Tyk extension (x-tyk-api-gateway
) and so will not be affected by the PATCH.
I hope this helps to give you confidence to configure the versioning for your API.
Branch/Environment/Version
N/A
Relevant Document
https://tyk.io/docs/getting-started/key-concepts/oas-versioning/
Describe the error
There is not really an error, but the page does not actually tell me how to configure versioning with the API. It gives me a sample of defining a "Base API" and in that sample, assumes that I have another version of the API that I want to reference as a Child. In actual use, I am going to be:
I have no idea how to do this from these docs. When I went to the API docs to look at requests and their parameters, I am still left wondering, as the PATCH request to /tyk/apis/oas/{api_id}/ does not mention that you can update versioning. So I think what I am left to try is:
But I have no idea if this will work, or when it does not, what I could possibly look at to see what is wrong.
Screenshots/Video
Additional context