Closed cuttingedge1109 closed 2 years ago
@cuttingedge1109 this is not actually a bug, since this is the way it was built. The expectation is that, in the OSS GW, the 'api_id' is provided in request payload, and users store internally a mechanism for generating these.
We do the same in our projects where we use the GW (like tyk-operator or Dashboard).
Thanks for raising this up !
Thank you @lghiur
Branch/Environment/Version
Describe the bug When a new API is created by gateway api
/tyk/apis
,api_id
field is not generated by tyk gateway. It seems api json file is generated with the name${api_id}.json
in /opt/tyk-gateway/appsdir. But because of empty
api_id, only one file -
.jsonfile is always generated for any api creation. It means I can only create one API because the latter api is overwriting
.json` file with its spec.I can pass
api_id
in the POST request data when create a new api butapi_id
should be generated by gateway uniquely, i think.Reproduction steps Create a new api without
api_id
field in POST request data.Expected behavior
api_id
should be generated by api_gateway and it should be returned as response data.Configuration (tyk config file): Used default config for on-premise tyk-gateway.