Skip to content

Commit 4c9242f

Browse files
committed
fix: address review comments from wing328
- Add docstring to deserializeErrorEntity method - Remove SmartBear Software copyright from test files
1 parent 6ac9def commit 4c9242f

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

modules/openapi-generator/src/main/resources/Java/libraries/jersey3/ApiClient.mustache

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1358,6 +1358,15 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
13581358
}
13591359
}
13601360
1361+
/**
1362+
* Deserialize the response body into an error entity based on HTTP status code.
1363+
* Looks up the error type from the errorTypes map using the response status code,
1364+
* or falls back to the "default" error type if no match is found.
1365+
*
1366+
* @param errorTypes Map of status code strings to GenericType for deserialization
1367+
* @param response The HTTP response
1368+
* @return The deserialized error entity, or null if not found or deserialization fails
1369+
*/
13611370
private Object deserializeErrorEntity(Map<String, GenericType> errorTypes, Response response) {
13621371
if (errorTypes == null) {
13631372
return null;

modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jersey3/JavaJersey3ErrorEntityFunctionalTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/*
22
* Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech)
3-
* Copyright 2018 SmartBear Software
43
*
54
* Licensed under the Apache License, Version 2.0 (the "License");
65
* you may not use this file except in compliance with the License.

modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jersey3/JavaJersey3ErrorEntityTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/*
22
* Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech)
3-
* Copyright 2018 SmartBear Software
43
*
54
* Licensed under the Apache License, Version 2.0 (the "License");
65
* you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)