OpenAPI Generator Servers API

The servers API from OpenAPI Generator — 3 operation(s) for servers.

OpenAPI Specification

openapi-generator-servers-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: This is an online openapi generator server.  You can find out more at https://github.com/OpenAPITools/openapi-generator.
  version: 7.12.0
  title: OpenAPI Generator Online Servers API
  contact: {}
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
- url: https://api.openapi-generator.tech/
tags:
- name: servers
paths:
  /api/gen/download/{fileId}:
    get:
      tags:
      - servers
      summary: Downloads a pre-generated file
      description: A valid `fileId` is generated by the `/clients/{language}` or `/servers/{language}` POST operations.  The fileId code can be used just once, after which a new `fileId` will need to be requested.
      operationId: downloadFile
      parameters:
      - name: fileId
        in: path
        description: fileId
        required: true
        schema:
          type: string
      responses:
        '200':
          description: successful operation
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      responsesObject:
        '200':
          description: successful operation
          schema:
            type: string
            format: binary
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
  /api/gen/servers:
    get:
      tags:
      - servers
      summary: Gets languages supported by the server generator
      operationId: serverOptions
      responses:
        '200':
          description: successful operation
          content:
            '*/*':
              schema:
                type: array
                items:
                  type: string
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      responsesObject:
        '200':
          description: successful operation
          schema:
            type: array
            items:
              type: string
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
  /api/gen/servers/{framework}:
    get:
      tags:
      - servers
      summary: Returns options for a server framework
      operationId: getServerOptions
      parameters:
      - name: framework
        in: path
        description: The target language for the server framework
        required: true
        schema:
          type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  $ref: '#/components/schemas/CliOption'
                  originalRef: CliOption
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      responsesObject:
        '200':
          description: successful operation
          schema:
            type: object
            additionalProperties:
              $ref: '#/components/schemas/CliOption'
              originalRef: CliOption
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
    post:
      tags:
      - servers
      summary: Generates a server library
      description: Accepts a `GeneratorInput` options map for spec location and generation options.
      operationId: generateServerForLanguage
      parameters:
      - name: framework
        in: path
        description: framework
        required: true
        schema:
          type: string
      responses:
        '200':
          description: successful operation
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ResponseCode'
                originalRef: ResponseCode
        '201':
          description: Created
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      responsesObject:
        '200':
          description: successful operation
          schema:
            $ref: '#/components/schemas/ResponseCode'
            originalRef: ResponseCode
        '201':
          description: Created
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GeneratorInput'
              originalRef: GeneratorInput
        description: parameters
        required: true
components:
  schemas:
    ResponseCode:
      type: object
      properties:
        code:
          type: string
          example: d40029be-eda6-4d62-b1ef-d05e2e91a72a
          description: File download code
        link:
          type: string
          example: http://localhost:8080/api/gen/download/d40029be-eda6-4d62-b1ef-d05e2e91a72a
          description: URL for fetching the generated client
      title: ResponseCode
    CliOption:
      type: object
      properties:
        default:
          type: string
        description:
          type: string
        enum:
          type: object
          additionalProperties:
            type: string
        opt:
          type: string
        optValue:
          type: string
        type:
          type: string
      title: CliOption
    AuthorizationValue:
      type: object
      properties:
        keyName:
          type: string
        type:
          type: string
        urlMatcher:
          $ref: '#/components/schemas/PredicateOfURL'
          originalRef: PredicateOfURL
        value:
          type: string
      title: AuthorizationValue
    PredicateOfURL:
      type: object
      title: PredicateOfURL
    GeneratorInput:
      type: object
      properties:
        authorizationValue:
          $ref: '#/components/schemas/AuthorizationValue'
          originalRef: AuthorizationValue
        openAPIUrl:
          type: string
          example: https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml
        openapiNormalizer:
          type: array
          items:
            type: string
        options:
          type: object
          additionalProperties:
            type: string
        spec:
          type: object
      title: GeneratorInput