acacode / acacode/swagger-typescript-api
Request body not marked as optional by default
未关闭
bug
- 主要语言
- TypeScript
- 星标
- 4.1k
- 派生
- 436
- PR 合并指标
- 30 天内没有已合并 PR
描述
According to the [swagger specification](https://swagger.io/docs/specification/describing-request-body/), request bodies are optional by default, i.e. if the `required` field doesn't exist, it should be inferred as `false`.
From my limited knowledge of the code, this seems to be doing the opposite, causing any `requestBody` without the `required` parameter to be inferred as required, even though it should not be.
https://github.com/acacode/swagger-typescript-api/blob/4d48d20626407fe91bf03671260ba520ba4889a6/src/schema-routes/schema-routes.js#L626-L628
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。