Skip to content

Commit 0a1b200

Browse files
committed
Malformed api-docs JSON when StringHttpMessageConverter is not active. Fixes #2051
1 parent 26a99aa commit 0a1b200

File tree

21 files changed

+8061
-33
lines changed

21 files changed

+8061
-33
lines changed

springdoc-openapi-starter-common/src/main/java/org/springdoc/api/AbstractOpenApiResource.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1232,7 +1232,7 @@ protected void initOpenAPIBuilder(Locale locale) {
12321232
* @return the string
12331233
* @throws JsonProcessingException the json processing exception
12341234
*/
1235-
protected String writeYamlValue(OpenAPI openAPI) throws JsonProcessingException {
1235+
protected byte[] writeYamlValue(OpenAPI openAPI) throws JsonProcessingException {
12361236
String result;
12371237
ObjectMapper objectMapper = springDocProviders.yamlMapper();
12381238
if (springDocConfigProperties.isWriterWithOrderByKeys())
@@ -1243,7 +1243,7 @@ protected String writeYamlValue(OpenAPI openAPI) throws JsonProcessingException
12431243
result = objectMapper.writerFor(OpenAPI.class).writeValueAsString(openAPI);
12441244
else
12451245
result = objectMapper.writerWithDefaultPrettyPrinter().forType(OpenAPI.class).writeValueAsString(openAPI);
1246-
return result;
1246+
return result.getBytes(StandardCharsets.UTF_8);
12471247
}
12481248

12491249
/**
@@ -1303,7 +1303,7 @@ protected boolean isActuatorRestController(String operationPath, HandlerMethod h
13031303
* @return the string
13041304
* @throws JsonProcessingException the json processing exception
13051305
*/
1306-
protected String writeJsonValue(OpenAPI openAPI) throws JsonProcessingException {
1306+
protected byte[] writeJsonValue(OpenAPI openAPI) throws JsonProcessingException {
13071307
String result;
13081308
ObjectMapper objectMapper = springDocProviders.jsonMapper();
13091309
if (springDocConfigProperties.isWriterWithOrderByKeys())
@@ -1312,7 +1312,7 @@ protected String writeJsonValue(OpenAPI openAPI) throws JsonProcessingException
13121312
result = objectMapper.writerFor(OpenAPI.class).writeValueAsString(openAPI);
13131313
else
13141314
result = objectMapper.writerWithDefaultPrettyPrinter().forType(OpenAPI.class).writeValueAsString(openAPI);
1315-
return result;
1315+
return result.getBytes(StandardCharsets.UTF_8);
13161316
}
13171317

13181318
/**

springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/api/MultipleOpenApiActuatorResource.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public MultipleOpenApiActuatorResource(List<GroupedOpenApi> groupedOpenApis, Obj
8585
*/
8686
@Operation(hidden = true)
8787
@GetMapping(value = "/{group}", produces = MediaType.APPLICATION_JSON_VALUE)
88-
public Mono<String> openapiJson(ServerHttpRequest
88+
public Mono<byte[]> openapiJson(ServerHttpRequest
8989
serverHttpRequest, @Value(API_DOCS_URL) String apiDocsUrl,
9090
@PathVariable String group, Locale locale)
9191
throws JsonProcessingException {
@@ -104,7 +104,7 @@ public Mono<String> openapiJson(ServerHttpRequest
104104
*/
105105
@Operation(hidden = true)
106106
@GetMapping(value = "/{group}/yaml", produces = APPLICATION_OPENAPI_YAML)
107-
public Mono<String> openapiYaml(ServerHttpRequest serverHttpRequest,
107+
public Mono<byte[]> openapiYaml(ServerHttpRequest serverHttpRequest,
108108
@Value(DEFAULT_API_DOCS_URL_YAML) String apiDocsUrl, @PathVariable String
109109
group, Locale locale) throws JsonProcessingException {
110110
return getOpenApiResourceOrThrow(group).openapiYaml(serverHttpRequest, apiDocsUrl + DEFAULT_PATH_SEPARATOR + group, locale);

springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/api/MultipleOpenApiWebFluxResource.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public MultipleOpenApiWebFluxResource(List<GroupedOpenApi> groupedOpenApis, Obje
8484
*/
8585
@Operation(hidden = true)
8686
@GetMapping(value = API_DOCS_URL + "/{group}", produces = MediaType.APPLICATION_JSON_VALUE)
87-
public Mono<String> openapiJson(ServerHttpRequest
87+
public Mono<byte[]> openapiJson(ServerHttpRequest
8888
serverHttpRequest, @Value(API_DOCS_URL) String apiDocsUrl, @PathVariable String
8989
group, Locale locale) throws JsonProcessingException {
9090
return getOpenApiResourceOrThrow(group).openapiJson(serverHttpRequest, apiDocsUrl + DEFAULT_PATH_SEPARATOR + group, locale);
@@ -102,7 +102,7 @@ public Mono<String> openapiJson(ServerHttpRequest
102102
*/
103103
@Operation(hidden = true)
104104
@GetMapping(value = DEFAULT_API_DOCS_URL_YAML + "/{group}", produces = APPLICATION_OPENAPI_YAML)
105-
public Mono<String> openapiYaml(ServerHttpRequest serverHttpRequest,
105+
public Mono<byte[]> openapiYaml(ServerHttpRequest serverHttpRequest,
106106
@Value(DEFAULT_API_DOCS_URL_YAML) String apiDocsUrl, @PathVariable String
107107
group, Locale locale) throws JsonProcessingException {
108108
return getOpenApiResourceOrThrow(group).openapiYaml(serverHttpRequest, apiDocsUrl + DEFAULT_PATH_SEPARATOR + group, locale);

springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/api/OpenApiActuatorResource.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public OpenApiActuatorResource(ObjectFactory<OpenAPIService> openAPIBuilderObjec
110110
*/
111111
@Operation(hidden = true)
112112
@GetMapping(value = DEFAULT_PATH_SEPARATOR, produces = MediaType.APPLICATION_JSON_VALUE)
113-
public Mono<String> openapiJson(ServerHttpRequest serverHttpRequest, Locale locale)
113+
public Mono<byte[]> openapiJson(ServerHttpRequest serverHttpRequest, Locale locale)
114114
throws JsonProcessingException {
115115
return super.openapiJson(serverHttpRequest, EMPTY, locale);
116116
}
@@ -126,7 +126,7 @@ public Mono<String> openapiJson(ServerHttpRequest serverHttpRequest, Locale loca
126126
*/
127127
@Operation(hidden = true)
128128
@GetMapping(value = DEFAULT_YAML_API_DOCS_ACTUATOR_PATH, produces = APPLICATION_OPENAPI_YAML)
129-
public Mono<String> openapiYaml(ServerHttpRequest serverHttpRequest, Locale locale)
129+
public Mono<byte[]> openapiYaml(ServerHttpRequest serverHttpRequest, Locale locale)
130130
throws JsonProcessingException {
131131
return super.openapiYaml(serverHttpRequest, YAML, locale);
132132
}

springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/api/OpenApiResource.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public OpenApiResource(ObjectFactory<OpenAPIService> openAPIBuilderObjectFactory
132132
* @return the mono
133133
* @throws JsonProcessingException the json processing exception
134134
*/
135-
protected Mono<String> openapiJson(ServerHttpRequest serverHttpRequest, String apiDocsUrl, Locale locale)
135+
protected Mono<byte[]> openapiJson(ServerHttpRequest serverHttpRequest, String apiDocsUrl, Locale locale)
136136
throws JsonProcessingException {
137137
calculateServerUrl(serverHttpRequest, apiDocsUrl, locale);
138138
OpenAPI openAPI = this.getOpenApi(locale);
@@ -148,7 +148,7 @@ protected Mono<String> openapiJson(ServerHttpRequest serverHttpRequest, String a
148148
* @return the mono
149149
* @throws JsonProcessingException the json processing exception
150150
*/
151-
protected Mono<String> openapiYaml(ServerHttpRequest serverHttpRequest, String apiDocsUrl, Locale locale)
151+
protected Mono<byte[]> openapiYaml(ServerHttpRequest serverHttpRequest, String apiDocsUrl, Locale locale)
152152
throws JsonProcessingException {
153153
calculateServerUrl(serverHttpRequest, apiDocsUrl, locale);
154154
OpenAPI openAPI = this.getOpenApi(locale);

springdoc-openapi-starter-webflux-api/src/main/java/org/springdoc/webflux/api/OpenApiWebfluxResource.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public OpenApiWebfluxResource(ObjectFactory<OpenAPIService> openAPIBuilderObject
114114
@Operation(hidden = true)
115115
@GetMapping(value = API_DOCS_URL, produces = MediaType.APPLICATION_JSON_VALUE)
116116
@Override
117-
public Mono<String> openapiJson(ServerHttpRequest serverHttpRequest, @Value(API_DOCS_URL) String apiDocsUrl, Locale locale)
117+
public Mono<byte[]> openapiJson(ServerHttpRequest serverHttpRequest, @Value(API_DOCS_URL) String apiDocsUrl, Locale locale)
118118
throws JsonProcessingException {
119119
return super.openapiJson(serverHttpRequest, apiDocsUrl, locale);
120120
}
@@ -131,7 +131,7 @@ public Mono<String> openapiJson(ServerHttpRequest serverHttpRequest, @Value(API_
131131
@Operation(hidden = true)
132132
@GetMapping(value = DEFAULT_API_DOCS_URL_YAML, produces = APPLICATION_OPENAPI_YAML)
133133
@Override
134-
public Mono<String> openapiYaml(ServerHttpRequest serverHttpRequest,
134+
public Mono<byte[]> openapiYaml(ServerHttpRequest serverHttpRequest,
135135
@Value(DEFAULT_API_DOCS_URL_YAML) String apiDocsUrl, Locale locale) throws JsonProcessingException {
136136
return super.openapiYaml(serverHttpRequest, apiDocsUrl, locale);
137137
}

springdoc-openapi-starter-webflux-api/src/test/java/test/org/springdoc/api/app81/SpringDocApp81Test.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
package test.org.springdoc.api.app81;
2424

2525
import java.net.URI;
26+
import java.nio.charset.StandardCharsets;
2627
import java.util.ArrayList;
2728
import java.util.Comparator;
2829
import java.util.List;
@@ -69,7 +70,8 @@ public void shouldGenerateOperationIdsDeterministically() throws Exception {
6970
when(request.getURI()).thenReturn(URI.create("http://localhost"));
7071

7172
String expected = getContent("results/app81.json");
72-
String openApi = resource.openapiJson(request, "", Locale.US).block();
73+
byte[] openApiBytes =resource.openapiJson(request, "", Locale.US).block();
74+
String openApi = new String(openApiBytes, StandardCharsets.UTF_8); // for UTF-8 encoding String openApi = resource.openapiJson(request, "", Locale.US).block();
7375
assertEquals(expected, openApi, true);
7476
}
7577

springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app15/SpringDocApp15Test.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040

4141
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
42-
properties = { "management.endpoints.web.exposure.include:*",
42+
properties = { "management.endpoints.web.exposure.include=*",
4343
"springdoc.use-management-port=true",
4444
"management.server.port=9294",
4545
"management.server.base-path=/test",

springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/api/MultipleOpenApiActuatorResource.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public MultipleOpenApiActuatorResource(List<GroupedOpenApi> groupedOpenApis, Obj
8383
*/
8484
@Operation(hidden = true)
8585
@GetMapping(value = "/{group}", produces = MediaType.APPLICATION_JSON_VALUE)
86-
public String openapiJson(HttpServletRequest request, @PathVariable String group, Locale locale)
86+
public byte[] openapiJson(HttpServletRequest request, @PathVariable String group, Locale locale)
8787
throws JsonProcessingException {
8888
return getOpenApiResourceOrThrow(group).openapiJson(request, "" + DEFAULT_PATH_SEPARATOR + group, locale);
8989
}
@@ -99,7 +99,7 @@ public String openapiJson(HttpServletRequest request, @PathVariable String group
9999
*/
100100
@Operation(hidden = true)
101101
@GetMapping(value = "/{group}/yaml", produces = APPLICATION_OPENAPI_YAML)
102-
public String openapiYaml(HttpServletRequest request, @PathVariable String group, Locale locale)
102+
public byte[] openapiYaml(HttpServletRequest request, @PathVariable String group, Locale locale)
103103
throws JsonProcessingException {
104104
return getOpenApiResourceOrThrow(group).openapiYaml(request, "" + DEFAULT_PATH_SEPARATOR + group, locale);
105105
}

springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/api/MultipleOpenApiWebMvcResource.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public MultipleOpenApiWebMvcResource(List<GroupedOpenApi> groupedOpenApis, Objec
8383
*/
8484
@Operation(hidden = true)
8585
@GetMapping(value = API_DOCS_URL + "/{group}", produces = MediaType.APPLICATION_JSON_VALUE)
86-
public String openapiJson(HttpServletRequest request, @Value(API_DOCS_URL) String apiDocsUrl,
86+
public byte[] openapiJson(HttpServletRequest request, @Value(API_DOCS_URL) String apiDocsUrl,
8787
@PathVariable String group, Locale locale)
8888
throws JsonProcessingException {
8989
return getOpenApiResourceOrThrow(group).openapiJson(request, apiDocsUrl + DEFAULT_PATH_SEPARATOR + group, locale);
@@ -101,7 +101,7 @@ public String openapiJson(HttpServletRequest request, @Value(API_DOCS_URL) Strin
101101
*/
102102
@Operation(hidden = true)
103103
@GetMapping(value = DEFAULT_API_DOCS_URL_YAML + "/{group}", produces = APPLICATION_OPENAPI_YAML)
104-
public String openapiYaml(HttpServletRequest request, @Value(DEFAULT_API_DOCS_URL_YAML) String apiDocsUrl,
104+
public byte[] openapiYaml(HttpServletRequest request, @Value(DEFAULT_API_DOCS_URL_YAML) String apiDocsUrl,
105105
@PathVariable String group, Locale locale)
106106
throws JsonProcessingException {
107107
return getOpenApiResourceOrThrow(group).openapiYaml(request, apiDocsUrl + DEFAULT_PATH_SEPARATOR + group, locale);

springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/api/OpenApiActuatorResource.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public OpenApiActuatorResource(String groupName, ObjectFactory<OpenAPIService> o
122122
*/
123123
@Operation(hidden = true)
124124
@GetMapping(value = DEFAULT_PATH_SEPARATOR, produces = MediaType.APPLICATION_JSON_VALUE)
125-
public String openapiJson(HttpServletRequest request, Locale locale)
125+
public byte[] openapiJson(HttpServletRequest request, Locale locale)
126126
throws JsonProcessingException {
127127
return super.openapiJson(request, EMPTY, locale);
128128
}
@@ -138,7 +138,7 @@ public String openapiJson(HttpServletRequest request, Locale locale)
138138
*/
139139
@Operation(hidden = true)
140140
@GetMapping(value = DEFAULT_YAML_API_DOCS_ACTUATOR_PATH, produces = APPLICATION_OPENAPI_YAML)
141-
public String openapiYaml(HttpServletRequest request, Locale locale)
141+
public byte[] openapiYaml(HttpServletRequest request, Locale locale)
142142
throws JsonProcessingException {
143143
return super.openapiYaml(request, YAML, locale);
144144
}

springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/api/OpenApiResource.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public OpenApiResource(ObjectFactory<OpenAPIService> openAPIBuilderObjectFactory
133133
* @return the string
134134
* @throws JsonProcessingException the json processing exception
135135
*/
136-
public String openapiJson(HttpServletRequest request,
136+
public byte[] openapiJson(HttpServletRequest request,
137137
String apiDocsUrl, Locale locale)
138138
throws JsonProcessingException {
139139
calculateServerUrl(request, apiDocsUrl, locale);
@@ -150,7 +150,7 @@ public String openapiJson(HttpServletRequest request,
150150
* @return the string
151151
* @throws JsonProcessingException the json processing exception
152152
*/
153-
public String openapiYaml(HttpServletRequest request,
153+
public byte[] openapiYaml(HttpServletRequest request,
154154
String apiDocsUrl, Locale locale)
155155
throws JsonProcessingException {
156156
calculateServerUrl(request, apiDocsUrl, locale);

springdoc-openapi-starter-webmvc-api/src/main/java/org/springdoc/webmvc/api/OpenApiWebMvcResource.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public OpenApiWebMvcResource(ObjectFactory<OpenAPIService> openAPIBuilderObjectF
112112
@Operation(hidden = true)
113113
@GetMapping(value = API_DOCS_URL, produces = MediaType.APPLICATION_JSON_VALUE)
114114
@Override
115-
public String openapiJson(HttpServletRequest request, @Value(API_DOCS_URL) String apiDocsUrl, Locale locale)
115+
public byte[] openapiJson(HttpServletRequest request, @Value(API_DOCS_URL) String apiDocsUrl, Locale locale)
116116
throws JsonProcessingException {
117117
return super.openapiJson(request, apiDocsUrl, locale);
118118
}
@@ -129,7 +129,7 @@ public String openapiJson(HttpServletRequest request, @Value(API_DOCS_URL) Strin
129129
@Operation(hidden = true)
130130
@GetMapping(value = DEFAULT_API_DOCS_URL_YAML, produces = APPLICATION_OPENAPI_YAML)
131131
@Override
132-
public String openapiYaml(HttpServletRequest request, @Value(DEFAULT_API_DOCS_URL_YAML) String apiDocsUrl, Locale locale)
132+
public byte[] openapiYaml(HttpServletRequest request, @Value(DEFAULT_API_DOCS_URL_YAML) String apiDocsUrl, Locale locale)
133133
throws JsonProcessingException {
134134
return super.openapiYaml(request, apiDocsUrl, locale);
135135
}

springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app136/SpringDocApp136Test.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
*/
2424
package test.org.springdoc.api.v30.app136;
2525

26+
import java.nio.charset.StandardCharsets;
2627
import java.util.ArrayList;
2728
import java.util.Comparator;
2829
import java.util.List;
@@ -68,7 +69,8 @@ public void shouldGenerateOperationIdsDeterministically() throws Exception {
6869
when(request.getRequestURL()).thenReturn(new StringBuffer("http://localhost"));
6970

7071
String expected = getContent("results/3.0.1/app136.json");
71-
String openApi = resource.openapiJson(request, "", Locale.getDefault());
72+
byte[] openApiBytes = resource.openapiJson(request, "", Locale.getDefault());
73+
String openApi = new String(openApiBytes, StandardCharsets.UTF_8); // for UTF-8 encoding assertEquals(expected, openApi, true);
7274
assertEquals(expected, openApi, true);
7375
}
7476

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
package test.org.springdoc.api.v30.app201;
2+
3+
import io.swagger.v3.oas.annotations.Operation;
4+
import io.swagger.v3.oas.annotations.responses.ApiResponse;
5+
6+
import org.springframework.http.HttpStatus;
7+
import org.springframework.web.bind.annotation.ExceptionHandler;
8+
import org.springframework.web.bind.annotation.GetMapping;
9+
import org.springframework.web.bind.annotation.RequestMapping;
10+
import org.springframework.web.bind.annotation.ResponseStatus;
11+
import org.springframework.web.bind.annotation.RestController;
12+
13+
/**
14+
* @author bnasslahsen
15+
*/
16+
@RestController
17+
@RequestMapping("/example2")
18+
public class Example2Controller {
19+
20+
@ExceptionHandler(Exception.class)
21+
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
22+
@ApiResponse(responseCode = "500", description = "ExceptionHandler in example2")
23+
public String customControllerException() {
24+
return "example2";
25+
}
26+
27+
@GetMapping("/500")
28+
@Operation(
29+
tags = "example2",
30+
summary = "Example2 method",
31+
description = "This method is an example2"
32+
)
33+
public void test() {
34+
throw new RuntimeException();
35+
}
36+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*
2+
*
3+
* *
4+
* * *
5+
* * * * Copyright 2019-2022 the original author or authors.
6+
* * * *
7+
* * * * Licensed under the Apache License, Version 2.0 (the "License");
8+
* * * * you may not use this file except in compliance with the License.
9+
* * * * You may obtain a copy of the License at
10+
* * * *
11+
* * * * https://www.apache.org/licenses/LICENSE-2.0
12+
* * * *
13+
* * * * Unless required by applicable law or agreed to in writing, software
14+
* * * * distributed under the License is distributed on an "AS IS" BASIS,
15+
* * * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* * * * See the License for the specific language governing permissions and
17+
* * * * limitations under the License.
18+
* * *
19+
* *
20+
*
21+
*/
22+
23+
package test.org.springdoc.api.v30.app201;
24+
25+
import test.org.springdoc.api.v30.AbstractSpringDocV30Test;
26+
27+
import org.springframework.boot.autoconfigure.SpringBootApplication;
28+
29+
public class SpringDocApp201Test extends AbstractSpringDocV30Test {
30+
31+
@SpringBootApplication
32+
static class SpringDocTestApp {}
33+
34+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package test.org.springdoc.api.v30.app201;
2+
3+
import java.util.List;
4+
5+
import org.springframework.http.converter.HttpMessageConverter;
6+
import org.springframework.http.converter.StringHttpMessageConverter;
7+
import org.springframework.stereotype.Component;
8+
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
9+
10+
/**
11+
* @author bnasslahsen
12+
*/
13+
@Component
14+
public class SpringWebConfig implements WebMvcConfigurer {
15+
16+
@Override
17+
public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
18+
converters.removeIf(c -> c instanceof StringHttpMessageConverter);
19+
}
20+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"openapi": "3.0.1",
3+
"info": {
4+
"title": "OpenAPI definition",
5+
"version": "v0"
6+
},
7+
"servers": [
8+
{
9+
"url": "http://localhost",
10+
"description": "Generated server url"
11+
}
12+
],
13+
"paths": {
14+
"/example2/500": {
15+
"get": {
16+
"tags": [
17+
"example2"
18+
],
19+
"summary": "Example2 method",
20+
"description": "This method is an example2",
21+
"operationId": "test",
22+
"responses": {
23+
"500": {
24+
"description": "ExceptionHandler in example2",
25+
"content": {
26+
"*/*": {
27+
"schema": {
28+
"type": "string"
29+
}
30+
}
31+
}
32+
},
33+
"200": {
34+
"description": "OK"
35+
}
36+
}
37+
}
38+
}
39+
},
40+
"components": {}
41+
}

0 commit comments

Comments
 (0)