Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<central-publishing-maven-plugin.version>0.11.0
</central-publishing-maven-plugin.version>
<flatten-maven-plugin.version>1.5.0</flatten-maven-plugin.version>
<swagger-api.version>2.2.53</swagger-api.version>
<swagger-api.version>2.2.54</swagger-api.version>
<swagger-ui.version>5.32.14</swagger-ui.version>
<gmavenplus-plugin.version>1.13.1</gmavenplus-plugin.version>
<jjwt.version>0.9.1</jjwt.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -565,13 +565,10 @@ public SpringDocUtils addParentType(String... parentTypes) {
* @return the spring doc utils
*/
public SpringDocUtils initExtraSchemas() {
customClasses().put("java.time.Duration", PrimitiveType.STRING);
customClasses().put("java.time.LocalTime", PrimitiveType.STRING);
customClasses().put("java.time.YearMonth", PrimitiveType.STRING);
customClasses().put("java.time.MonthDay", PrimitiveType.STRING);
customClasses().put("java.time.Year", PrimitiveType.STRING);
customClasses().put("java.time.Period", PrimitiveType.STRING);
customClasses().put("java.time.OffsetTime", PrimitiveType.STRING);
customClasses().put("java.time.ZoneId", PrimitiveType.STRING);
customClasses().put("java.time.ZoneOffset", PrimitiveType.STRING);
customClasses().put("java.util.TimeZone", PrimitiveType.STRING);
Expand All @@ -586,13 +583,10 @@ public SpringDocUtils initExtraSchemas() {
* @return the spring doc utils
*/
public SpringDocUtils resetExtraSchemas() {
customClasses().remove("java.time.Duration");
customClasses().remove("java.time.LocalTime");
customClasses().remove("java.time.YearMonth");
customClasses().remove("java.time.MonthDay");
customClasses().remove("java.time.Year");
customClasses().remove("java.time.Period");
customClasses().remove("java.time.OffsetTime");
customClasses().remove("java.time.ZoneId");
customClasses().remove("java.time.ZoneOffset");
customClasses().remove("java.util.TimeZone");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ public Operation customize(Operation operation, HandlerMethod handlerMethod) {
Content content = response.getContent();
if (content.containsKey(MediaType.APPLICATION_JSON_VALUE)) {
Schema schema = content.get(MediaType.APPLICATION_JSON_VALUE).getSchema();
schema.getProperties().clear();
schema.types(Set.of("string"));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"content": {
"application/json": {
"schema": {
"type": "string"
"type": "string",
"format": "duration"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"application/json": {
"schema": {
"type": "string",
"properties": {}
"format": "duration"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@
"format": "date"
},
"localTime": {
"type": "string"
"type": "string",
"format": "partial-time"
},
"yearMonth": {
"type": "string"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ public Operation customize(Operation operation, HandlerMethod handlerMethod) {
Content content = response.getContent();
if (content.containsKey(MediaType.APPLICATION_JSON_VALUE)) {
Schema schema = content.get(MediaType.APPLICATION_JSON_VALUE).getSchema();
schema.getProperties().clear();
schema.setType("string");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ public Operation customize(Operation operation, HandlerMethod handlerMethod) {
if (content.containsKey(MediaType.APPLICATION_JSON_VALUE)) {
Schema schema = content.get(MediaType.APPLICATION_JSON_VALUE).getSchema();
schema.types(Set.of("string"));
schema.getProperties().clear();
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"application/json": {
"schema": {
"type": "string",
"properties": {}
"format": "duration"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"application/json": {
"schema": {
"type": "string",
"properties": {}
"format": "duration"
}
}
}
Expand Down
Loading