Ah, i thought by using tag latest
, it will get latest version, but it’s actually v4.0.0
so i change my docker compose file to use tag v5.7
, which should support OAS, but somehow it still doesn’t work. For using OAS, i started without auth at all, since i know that the classic spec works, but somehow it still doesn’t work 
Here is my simple OAS spec:
{
"components": {},
"info": {
"title": "Stocks API",
"description": "API for stock prices",
"version": "1.0.0"
},
"openapi": "3.0.3",
"paths": {},
"servers": [
{
"url": "http://localhost:8081"
}
],
"x-tyk-api-gateway": {
"info": {
"id": "stocks",
"orgId": "default",
"name": "stocks",
"state": {
"active": true
}
},
"server": {
"listenPath": {
"strip": false,
"value": "/stocks/"
}
},
"upstream": {
"url": "http://app-web:9091"
}
}
}
and looking at the gateway logs, i see it said the spec is invalid and the listen path is empty… hmm, do you know what I missed here? Thanks again!
time="Jun 11 01:46:37" level=debug msg="Set log level to \"debug\"" prefix=main
time="Jun 11 01:46:37" level=debug msg="Using /opt/tyk-gateway/tyk.conf for configuration" prefix=main
time="Jun 11 01:46:37" level=info msg="Tyk API Gateway 5.7.3" prefix=main
time="Jun 11 01:46:37" level=warning msg="Insecure configuration allowed" config.allow_insecure_configs=true prefix=checkup
time="Jun 11 01:46:37" level=error msg="storage: Redis is either down or was not configured"
time="Jun 11 01:46:37" level=error msg="Could not set version in versionStore" error="storage: Redis is either down or was not configured" prefix=main
time="Jun 11 01:46:37" level=error msg="storage: Redis is either down or was not configured"
time="Jun 11 01:46:37" level=debug msg="No Primary instance found, assuming control" prefix=host-check-mgr
time="Jun 11 01:46:37" level=error msg="storage: Redis is either down or was not configured"
time="Jun 11 01:46:37" level=error msg="cannot set key in pollerCacheKey" error="storage: Redis is either down or was not configured"
time="Jun 11 01:46:37" level=info msg="Starting Poller" prefix=host-check-mgr
time="Jun 11 01:46:37" level=debug msg="---> Initialising checker" prefix=host-check-mgr
time="Jun 11 01:46:37" level=debug msg="[HOST CHECKER] Config:TriggerLimit: 3"
time="Jun 11 01:46:37" level=debug msg="[HOST CHECKER] Config:Timeout: ~10"
time="Jun 11 01:46:37" level=debug msg="[HOST CHECKER] Config:WorkerPool: 4"
time="Jun 11 01:46:37" level=debug msg="[HOST CHECKER] Init complete"
time="Jun 11 01:46:37" level=debug msg="---> Starting checker" prefix=host-check-mgr
time="Jun 11 01:46:37" level=debug msg="[HOST CHECKER] Starting..."
time="Jun 11 01:46:37" level=debug msg="[HOST CHECKER] Check loop started..."
time="Jun 11 01:46:37" level=debug msg="[HOST CHECKER] Host reporter started..."
time="Jun 11 01:46:37" level=debug msg="---> Checker started." prefix=host-check-mgr
time="Jun 11 01:46:37" level=debug msg="Notifier will not work in hybrid mode" prefix=main
time="Jun 11 01:46:37" level=info msg="PIDFile location set to: /var/run/tyk/tyk-gateway.pid" prefix=main
time="Jun 11 01:46:37" level=warning msg="The control_api_port should be changed for production" prefix=main
time="Jun 11 01:46:37" level=debug msg="Initialising default org store" prefix=main
time="Jun 11 01:46:37" level=error msg="storage: Redis is either down or was not configured"
time="Jun 11 01:46:37" level=error msg="Connection to Redis failed, reconnect in 10s" error="storage: Redis is either down or was not configured" prefix=pub-sub
time="Jun 11 01:46:37" level=info msg="Initialising Tyk REST API Endpoints" prefix=main
time="Jun 11 01:46:37" level=info msg="job run successful" name=purge-oauth-tokens prefix=scheduler
time="Jun 11 01:46:37" level=debug msg="Creating new default Storage connection"
time="Jun 11 01:46:37" level=debug msg="Creating new cache Storage connection"
time="Jun 11 01:46:37" level=debug msg="Creating new analytics Storage connection"
time="Jun 11 01:46:37" level=debug msg="Loaded API Endpoints" prefix=main
time="Jun 11 01:46:37" level=info msg="--> Standard listener (http)" port=":8081" prefix=main
time="Jun 11 01:46:37" level=warning msg="Starting HTTP server on:[::]:8081" prefix=main
time="Jun 11 01:46:37" level=info msg="[RATELIMIT] DRL with Redis Rate Limiter enabled (using pipeline)"
time="Jun 11 01:46:37" level=info msg="Initialising distributed rate limiter" prefix=main
time="Jun 11 01:46:37" level=debug msg="DRL: Setting node ID: solo-437d1201-00ee-4ea0-a6c2-ca6b8f56a59b|4b2e9dddb55c"
time="Jun 11 01:46:37" level=info msg="Tyk Gateway started (5.7.3)" prefix=main
time="Jun 11 01:46:37" level=info msg="--> Listening on address: (open interface)" prefix=main
time="Jun 11 01:46:37" level=info msg="--> Listening on port: 8081" prefix=main
time="Jun 11 01:46:37" level=info msg="--> PID: 1" prefix=main
time="Jun 11 01:46:37" level=info msg="Starting gateway rate limiter notifications..."
time="Jun 11 01:46:37" level=error msg="storage: Redis is either down or was not configured"
time="Jun 11 01:46:37" level=debug msg="Default JSVM timeout used: 5s" prefix=jsvm
time="Jun 11 01:46:37" level=info msg="Loading policies" prefix=main
time="Jun 11 01:46:37" level=info msg="Loading policy from dir /opt/tyk-gateway/policies/policy.json"
time="Jun 11 01:46:37" level=info msg="Policies found (1 total):" prefix=main
time="Jun 11 01:46:37" level=debug msg=" - " prefix=main
time="Jun 11 01:46:37" level=info msg="Loading API Specification from /opt/tyk-gateway/apps/stock-price.json"
time="Jun 11 01:46:37" level=info msg="Detected 1 APIs" prefix=main
time="Jun 11 01:46:37" level=info msg="Loading API configurations." prefix=main
time="Jun 11 01:46:37" level=info msg="Tracking hostname" api_name= domain="(no host)" prefix=main
time="Jun 11 01:46:37" level=info msg="Initialising Tyk REST API Endpoints" prefix=main
time="Jun 11 01:46:37" level=debug msg="Loaded API Endpoints" prefix=main
time="Jun 11 01:46:37" level=info msg="API bind on custom port:0" prefix=main
time="Jun 11 01:46:37" level=error msg="Listen path is empty" api_id= api_name= org_id=
time="Jun 11 01:46:37" level=warning msg="Spec not valid, skipped!" api_id= api_name= org_id=
time="Jun 11 01:46:37" level=debug msg="Checker host list" prefix=main
time="Jun 11 01:46:37" level=info msg="Loading uptime tests..." prefix=host-check-mgr
time="Jun 11 01:46:37" level=debug msg="--- Setting tracking list up" prefix=host-check-mgr
time="Jun 11 01:46:37" level=debug msg="Reset initiated" prefix=host-check-mgr
time="Jun 11 01:46:37" level=debug msg="[HOST CHECKER] Checker reset queued!"
time="Jun 11 01:46:37" level=debug msg="Checker host Done" prefix=main
time="Jun 11 01:46:37" level=info msg="Initialised API Definitions" prefix=main
time="Jun 11 01:46:37" level=warning msg="All APIs are protected with mTLS, except for the control API. We recommend configuring the control API port or control hostname to ensure consistent security measures" prefix=main
time="Jun 11 01:46:37" level=info msg="API reload complete" prefix=main
time="Jun 11 01:46:44" level=debug msg="[HOST CHECKER] Host list reset"
time="Jun 11 01:46:47" level=debug msg="Error trying to get value:key not found"
time="Jun 11 01:46:47" level=debug msg="No Primary instance found, assuming control" prefix=host-check-mgr
time="Jun 11 01:46:57" level=debug msg="Primary instance set, I am master" prefix=host-check-mgr
time="Jun 11 01:47:07" level=debug msg="Primary instance set, I am master" prefix=host-check-mgr