acacode / acacode/swagger-typescript-api

incorrect nested query params serialization

Đang mở
#464 4 bình luận 12 reaction 0 người được giao Xem trên GitHub
bug
Ngôn ngữ chính
TypeScript
Star
4.1k
Fork
436
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Hello,

I'm using the 12.0.2

When an endpoint has a query param containing a nested object like this :

```yaml
- name: pageParams
in: query
required: false
explode: true
schema:
$ref: "common.yaml#/components/schemas/PaginatedRequestParams"
```
```yaml
PaginatedRequestParams:
description:
Page params to search the collection (this is an exploded object, so pass the inner properties directly)
type: object
properties:
limit:
description: Number of elements to retrieve
type: integer
default: 50
cursor:
description: Cursor from a previous search
type: string
format: base64
returnCount:
description: Set to 'true' to obtain the total count of the collection (use only when necessary, may be performance-costly)
type: boolean
default: false
```

The request query is serialized like this :
```
&pageParams=%5Bobject%20Object%5D
```

however the type seems ok :
```js
query?: {
...
pageParams?: PaginatedRequestParams;
},
```

Looking at the issue history, it seemed to be handled at a time but a reverted in this fix :
https://github.com/acacode/swagger-typescript-api/issues/228

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.