Swagger Generator
Swagger Generator is a tool for generating API client libraries, server stubs, or related code from Swagger or OpenAPI definitions.
- Base URL:
https://generator.swagger.io/api - Auth:
bearer(pass your key via theapiKeyinput)
Operations
clientoptions— GET /gen/clients — Gets languages supported by the client generatorgetclientoptions— GET /gen/clients/{language} — Returns options for a client librarydownloadfile— GET /gen/download/{fileId} — Downloads a pre-generated fileserveroptions— GET /gen/servers — Gets languages supported by the server generatorgetserveroptions— GET /gen/servers/{framework} — Returns options for a server frameworkgenerateclient— POST /gen/clients/{language} — Generates a client library
Inputs
apiKey— your swagger-generator API keyoperation— one of the operations above- path parameters when an operation's path contains
{...} query— optional JSON object of query paramsbody— JSON object for create/update ops
Example
operation: clientoptions
apiKey: <your key>
Publishes
The keys a later task may reference as {{taskName.key}}. Referencing anything not listed here resolves to nothing at run time.
erroroperationresultstatus
Input Properties
Every property this tool accepts, from its own tool.iml.
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
apiKey |
string | yes | — | DEPRECATED — bind an API Key credential to the task with credentialName instead. A key pasted here is stored in the workflow definition in clear and appears in every export of it. Still honoured for workflows built before the change. |
operation |
string | yes | — | One of: clientoptions, getclientoptions, downloadfile, serveroptions, getserveroptions, generateclient |
fileId |
string | no | — | Path parameter fileId (required by some operations). |
framework |
string | no | — | Path parameter framework (required by some operations). |
language |
string | no | — | Path parameter language (required by some operations). |
body |
string | no | — | Request body as a JSON object string (for create/update operations). |
query |
string | no | — | Query-string parameters as a JSON object string, e.g. {"limit": 50}. Parsed and url-encoded onto the request. |