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”
wsadmin@wsadmin$:/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
Use ./tyk import --swagger instead. We’ll fix the docs.
Try
./tyk --help
and then
./tyk import --help
$ ./tyk import --help
usage: tyk import [] []
Imports a BluePrint/Swagger/WSDL file
Flags:
-h, --help Show context-sensitive help (also try --help-long and --help-man).
–version Show application version.
–swagger Use Swagger mode
–blueprint Use BluePrint mode
–wsdl Use WSDL mode
–port-names=PORT-NAMES Specify port name of each service in the WSDL file. Input format is comma
separated list of serviceName:portName
–create-api Creates a new API definition from the blueprint
–org-id=ORG-ID assign the API Definition to this org_id (required with create-api
–upstream-target=URL set the upstream target for the definition
–as-mock creates the API as a mock based on example fields
–for-api=PATH adds blueprint to existing API Definition as version
–as-version=VERSION the version number to use when inserting
Args:
[] e.g. blueprint.json, swagger.json, service.wsdl etc.