Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Multi tagged APIs not supported #855

Open
kpanot opened this issue Oct 3, 2023 · 1 comment · May be fixed by #1739
Open

[Bug]: Multi tagged APIs not supported #855

kpanot opened this issue Oct 3, 2023 · 1 comment · May be fixed by #1739
Labels
bug Something isn't working priority:high

Comments

@kpanot
Copy link
Contributor

kpanot commented Oct 3, 2023

Package name

generator-sdk

Package version

9..

Reproduction steps

API to use:

openapi: "3.0.0"
info:
  version: 1.0.0
  title: Swagger Petstore
  license:
    name: MIT
servers:
  - url: http://petstore.swagger.io/v1
paths:
  /pets:
    get:
      summary: List all pets
      operationId: listPets
      tags:
        - pets
        - other
      parameters:
        - name: limit
          in: query
          description: How many items to return at one time (max 100)
          required: false
          schema:
            type: integer
            maximum: 100
            format: int32
      responses:
        '200':
          description: A paged array of pets
          headers:
            x-next:
              description: A link to the next page of responses
              schema:
                type: string
          content:
            application/json:    
              schema:
                $ref: "#/components/schemas/Pets"
 components:
  schemas:
    Pet:
      type: object
      required:
        - id
        - name
      properties:
        id:
          type: integer
          format: int64
        name:
          type: string
        tag:
          type: string
    Pets:
      type: array
      maxItems: 100
      items:
        $ref: "#/components/schemas/Pet"
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string

Current result

Build failure because of double export of listPetsRequestData from other.ts and pets.ts

Expected result

  • Best solution: Export once the interface used in both Apis
  • possible solution: Export both interface with different name

Additional comments

The error has been reported for RequestData interface only but may be also on the Apis exported functions as well.

@kpanot kpanot added the bug Something isn't working label Oct 3, 2023
@kpanot kpanot added this to the SDK Enhancement milestone Oct 3, 2023
kpanot added a commit that referenced this issue May 1, 2024
[Bug]: Multi tagged APIs not supported #855
@kpanot kpanot linked a pull request May 1, 2024 that will close this issue
kpanot added a commit that referenced this issue May 7, 2024
[Bug]: Multi tagged APIs not supported #855
@kpanot
Copy link
Contributor Author

kpanot commented May 16, 2024

Due to breaking change in the interface removal, the fix will be completely effective in v11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority:high
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants