Shaddix / react-query-swagger

Generates react-query hooks based on Swagger API definitions
MIT License
122 stars 4 forks source link

My DTO has [key: string]: any; #32

Open eladcandroid opened 11 months ago

eladcandroid commented 11 months ago

How to prevent adding [key: string]: any; ? I want to include only my schema properties but the generator adds also the general index signature.

export interface IAlertDto {
    id: string;
    name: string;
    createdAt: Date;

    [key: string]: any;
}
Rudomitori commented 11 months ago

@eladcandroid, Can you provide the "Swagger" specification and the command line arguments that you use?

synasapmob commented 6 months ago

@eladcandroid, Can you provide the "Swagger" specification and the command line arguments that you use?

my issue as the same, can you help me


 "/something": {
      "get": {
        "operationId": "something",
        "parameters": [

        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/BaseResult"
                    },
                    {
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/somethingDto"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": [
          "something"
        ]
      }
    },```
Rudomitori commented 6 months ago

@synasapmob What is the definition of BaseResult? What CLI arguments do you use?