Skip to content

Buffer type breaks generated SDKs #311

@balanza

Description

@balanza

Operations which produce octet/stream responses will be resolved into generated definitions using Buffer as defined in #293

This breaks the build of SDK packages as Buffer is not a native Typescript type

Example

swagger: '2.0'
info:
  version: 1.0.0
  title: API
host: localhost
basePath: /api/v1
schemes:
  - https
paths:
  /mypath:
    get:
      summary: An endpoint
      produces:
        - application/octet-stream
      responses:
        '200':
          description: Success
          schema:
            format: binary
            type: string
        '400':
          description: Bad Request
        '500':
          description: Internal Server Error
requestTypes.ts:2047:8 - error TS4016: Type parameter 'A0' of exported function has or is using private name 'Buffer'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions