Unable to Import Swagger definition using CLI

Hi There,

I am trying to import swagger definition using CLI I am new in the API management, I am using tyk community edition.
When I execute below command I am getting a error as “tyk: error: unknown long flag ‘–import-swagger’, try --help”
[email protected]$:/opt/tyk-gateway$ ./tyk --import-swagger=app.json --create-api --org-id=default --upstream-target=“http://192.168.16.8:31613/xyz/abc/r4
tyk: error: unknown long flag ‘–import-swagger’, try --help

can anyone please let me know if I am doing anything wrong

Hello @Rohit_Thakur,

Which version of tyk-gateway are you using?

Zaid

Hi Zaid

We are using tyk gateway 3.1

Regards
Rohit

Hello @Rohit_Thakur

I am not entirely sure why you’re getting this issue.

Can you please run this command and let me know what you get?

./tyk --create-api --import-swagger=app.json --org-id=default --upstream-target="http://192.168.16.8:31613/xyz/abc/r4"