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

有多个in body的#parameters 时@rtk-query/codegen-openapi报错 #24

Open
kerryChen95 opened this issue Apr 13, 2022 · 1 comment
Open

Comments

@kerryChen95
Copy link

问题表现

有多个 in body#parameters 时 ,将所生成的 app/public/swagger/*.json 返回给前端用于 @rtk-query/codegen-openapi ,会报错 has multiple requestBodies

根本原因

按照OpenAPI 2.0示例,in body的 parameters 只有1个,用 properties 表示其中不同的参数
但 swagger-egg 会生成多个 in body的 parameters

@JsonMa
Copy link
Owner

JsonMa commented Apr 13, 2022

问题表现

有多个 in body#parameters 时 ,将所生成的 app/public/swagger/*.json 返回给前端用于 @rtk-query/codegen-openapi ,会报错 has multiple requestBodies

根本原因

按照OpenAPI 2.0示例,in body的 parameters 只有1个,用 properties 表示其中不同的参数。 但 swagger-egg 会生成多个 in body的 parameters

多个in body时没进行校验,这个我后面加一下吧。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants