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

生成的md文档,请求参数类型无法正确配置 #766

Open
a156555284 opened this issue Apr 4, 2024 · 0 comments
Open

生成的md文档,请求参数类型无法正确配置 #766

a156555284 opened this issue Apr 4, 2024 · 0 comments

Comments

@a156555284
Copy link

a156555284 commented Apr 4, 2024

这段代码设置了请求参数类型,但是生成文档,没有按照指定的类型生成。

@PostMapping清晰的指明了consumes 属性的类型为 MediaType.APPLICATION_JSON_VALUE

代码如下:

   @Operation(summary = "json参数查询1",description = "json参数查询1111")
    @PostMapping(value = "/getRequest1",consumes = MediaType.APPLICATION_JSON_VALUE)
    public ResponseEntity<UserSchema> getRequest1(@Valid @RequestBody UserSchema userSchema, 
                                                  @RequestParam("cade")String cade){

        return ResponseEntity.ok(userSchema);

    }

但是生成的文档如图所示,我使用的是官方下载的knife4j-spring-boot3-demo测试的

image

@a156555284 a156555284 changed the title 生成的md文档,请求参数类型无法 生成的md文档,请求参数类型无法正确配置 Apr 4, 2024
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

1 participant