Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #13853
Closed
Open
Issue created Oct 28, 2022 by Administrator@rootContributor5 of 6 checklist items completed5/6 checklist items

[BUG] [typescript-fetch] inconsist semi colon in template

Created by: nologyance

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

Some template has inconsists semi colon. For example, runtime.ts.

        const initParams = {
            method: context.method,
            headers,
            body: context.body,
            credentials: this.configuration.credentials,
        };

        const overridedInit: RequestInit = {
            ...initParams,
            ...(await initOverrideFn({
                init: initParams,
                context,
            }))
        } // here

        const init: RequestInit = {
            ...overridedInit,
            body:
                isFormData(overridedInit.body) ||
                overridedInit.body instanceof URLSearchParams ||
                isBlob(overridedInit.body)
                    ? overridedInit.body
                    : JSON.stringify(overridedInit.body),
        };
openapi-generator version

v6.2.0

OpenAPI declaration file content or url

openapi: 3.0.0
info:
  version: 1.0.0
  title: Example
paths:
  /example/employee:
    get:
      operationId: getEmployee
      tags:
        - employee
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Employee"
components:
  schemas:
    Employee:
      type: object
      properties:
        name:
          type: string
Generation Details
docker run --rm -v "${PWD}:/local" \
  openapitools/openapi-generator-cli:v6.2.0 generate \
  -i /local/openapi.yaml \
  -g typescript-fetch \
  -o /local/dist/typescript-fetch
Related issues/PRs

#10120 (closed)

Assignee
Assign to
Time tracking