Spring boot rest服务的Spring rest文档,JSONObject为@RequestParam

Spring boot rest服务的Spring rest文档,JSONObject为@RequestParam,spring-boot,spring-rest,spring-restdocs,Spring Boot,Spring Rest,Spring Restdocs,我正在尝试为rest服务编写SpringREST文档,该服务将JSONObject作为@RequestParam接受。 例: 此外,我需要发布对cdomain和日期的描述,以便于理解。 我可以使用以下代码为@PathVariable生成rest文档: URL - http://localhost:9090/report/11 this.mockMvc.perform(RestDocumentationRequestBuilders.get("/report/{id}",1))

我正在尝试为rest服务编写SpringREST文档,该服务将JSONObject作为@RequestParam接受。 例:

此外,我需要发布对cdomain和日期的描述,以便于理解。 我可以使用以下代码为@PathVariable生成rest文档:

URL - http://localhost:9090/report/11

this.mockMvc.perform(RestDocumentationRequestBuilders.get("/report/{id}",1))
                .andExpect(status().isOk())
                .andExpect(content().contentType("application/json;charset=UTF-8"))
                .andDo(document("fin-report/balance-sheet",
                        pathParameters(parameterWithName("id")
                                .description("Identifier of the person to be obtained.")),
                        responseFields()...

请让我知道如何以@RequestParam的形式为JSONObject编写文档,如下面的代码和URL:

Code - @RequestMapping(method = RequestMethod.GET, produces = "application/json", path = "report)
    public String getReport(@RequestParam(value="request") JSONObject jobjparam) {...}

URL - http://localhost:9090/report?request={cdomain:automation,date:20190920}

“MockMvc中的requestParameters不可用”是什么意思?您可以使用向请求添加参数。请忽略requestParameters部分。删除了评论。你可以帮我回答帖子中提到的问题
Code - @RequestMapping(method = RequestMethod.GET, produces = "application/json", path = "report)
    public String getReport(@RequestParam(value="request") JSONObject jobjparam) {...}

URL - http://localhost:9090/report?request={cdomain:automation,date:20190920}