update samples

This commit is contained in:
William Cheng
2024-02-08 11:38:49 +08:00
parent bc680568c5
commit 7cdbb2a7b4
3 changed files with 6 additions and 4 deletions

View File

@@ -321,7 +321,7 @@ func NewNullableTime(val *time.Time) *NullableTime {
}
func (v NullableTime) MarshalJSON() ([]byte, error) {
return v.value.MarshalJSON()
return json.Marshal(v.value)
}
func (v *NullableTime) UnmarshalJSON(src []byte) error {

View File

@@ -320,7 +320,7 @@ func NewNullableTime(val *time.Time) *NullableTime {
}
func (v NullableTime) MarshalJSON() ([]byte, error) {
return v.value.MarshalJSON()
return json.Marshal(v.value)
}
func (v *NullableTime) UnmarshalJSON(src []byte) error {

View File

@@ -19,6 +19,8 @@ public class RestConfiguration extends RouteBuilder {
.component("servlet")
.bindingMode(RestBindingMode.auto)
.dataFormatProperty("json.out.disableFeatures", "WRITE_DATES_AS_TIMESTAMPS")
.clientRequestValidation(true);
.clientRequestValidation(true)
.apiProperty("api.title", "OpenAPI Petstore")
.apiProperty("api.version", "1.0.0");
}
}
}