Swagger Generator
  1. clients
Swagger Generator
  • clients
    • Gets languages supported by the client generator
      GET
    • Returns options for a client library
      GET
    • Generates a client library
      POST
    • Downloads a pre-generated file
      GET
  • servers
    • Gets languages supported by the server generator
      GET
    • Returns options for a server framework
      GET
    • Generates a server library
      POST
  1. clients

Generates a client library

POST
/gen/clients/{language}
clients
Accepts a GeneratorInput options map for spec location and generation options
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/gen/clients/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "authorizationValue": {
        "keyName": "string",
        "type": "string",
        "value": "string"
    },
    "options": {
        "property1": "string",
        "property2": "string"
    },
    "securityDefinition": {
        "description": "string",
        "type": "string"
    },
    "spec": {},
    "swaggerUrl": "http://petstore.swagger.io/v2/swagger.json"
}'
Response Response Example
{
  "code": "d40029be-eda6-4d62-b1ef-d05e2e91a72a",
  "link": "http://generator.swagger.io:80/api/gen/download/d40029be-eda6-4d62-b1ef-d05e2e91a72a"
}

Request

Path Params
language
string 
required
The target language for the client library
Body Params application/json
authorizationValue
object (AuthorizationValue) 
optional
keyName
string 
optional
type
string 
optional
value
string 
optional
options
object 
optional
Additional properties
string 
optional
securityDefinition
object (SecuritySchemeDefinition) 
optional
description
string 
optional
type
string 
optional
spec
object 
optional
swaggerUrl
string 
optional
Example:
http://petstore.swagger.io/v2/swagger.json
Examples

Responses

🟢200successful operation
application/json
Body
code
string 
optional
File download code
Example:
d40029be-eda6-4d62-b1ef-d05e2e91a72a
link
string 
optional
URL for fetching the generated client
Example:
http://generator.swagger.io:80/api/gen/download/d40029be-eda6-4d62-b1ef-d05e2e91a72a
Previous
Returns options for a client library
Next
Downloads a pre-generated file
Built with