From 7f017ed5465d9fed9ace2252335da96fd329270f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Phillip=20Kr=C3=BCger?= Date: Wed, 4 Oct 2023 12:44:30 +1100 Subject: [PATCH] Fix time example and link (#1591) Signed-off-by: Phillip Kruger --- .../io/smallrye/openapi/runtime/util/TypeUtil.java | 10 +++++----- .../runtime/scanner/resource.parameters.time.json | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/core/src/main/java/io/smallrye/openapi/runtime/util/TypeUtil.java b/core/src/main/java/io/smallrye/openapi/runtime/util/TypeUtil.java index ff3f652df..93e3a7716 100644 --- a/core/src/main/java/io/smallrye/openapi/runtime/util/TypeUtil.java +++ b/core/src/main/java/io/smallrye/openapi/runtime/util/TypeUtil.java @@ -91,7 +91,7 @@ public class TypeUtil { /* * This is used both for Java Period and Duration according to * https://docs.oracle.com/javase/8/docs/api/java/time/Period.html - * As they're both basically https://tools.ietf.org/html/rfc3339#appendix-A + * As they're both basically https://www.rfc-editor.org/rfc/rfc3339.html#section-5.6 * Examples is parsed from both classes */ private static final TypeWithFormat DURATION_FORMAT = TypeWithFormat.of(SchemaType.STRING).format(DataFormat.DURATION) @@ -99,12 +99,12 @@ public class TypeUtil { .build(); private static final TypeWithFormat TIME_FORMAT = TypeWithFormat.of(SchemaType.STRING).format(DataFormat.TIME) .externalDocumentation("As defined by 'full-time' in RFC3339", - "https://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14") - .example("13:45.30.123456789+02:00").build(); + "https://www.rfc-editor.org/rfc/rfc3339.html#section-5.6") + .example("13:45:30.123456789+02:00").build(); private static final TypeWithFormat TIME_LOCAL_FORMAT = TypeWithFormat.of(SchemaType.STRING).format(DataFormat.TIME_LOCAL) .externalDocumentation("As defined by 'partial-time' in RFC3339", - "https://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14") - .example("13:45.30.123456789").build(); + "https://www.rfc-editor.org/rfc/rfc3339.html#section-5.6") + .example("13:45:30.123456789").build(); private static final Map TYPE_MAP = new LinkedHashMap<>(); public static final IndexView jdkIndex; diff --git a/extension-jaxrs/src/test/resources/io/smallrye/openapi/runtime/scanner/resource.parameters.time.json b/extension-jaxrs/src/test/resources/io/smallrye/openapi/runtime/scanner/resource.parameters.time.json index 9ec702c42..681ee8935 100644 --- a/extension-jaxrs/src/test/resources/io/smallrye/openapi/runtime/scanner/resource.parameters.time.json +++ b/extension-jaxrs/src/test/resources/io/smallrye/openapi/runtime/scanner/resource.parameters.time.json @@ -96,18 +96,18 @@ "format": "local-time", "externalDocs": { "description": "As defined by 'partial-time' in RFC3339", - "url": "https://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14" + "url": "https://www.rfc-editor.org/rfc/rfc3339.html#section-5.6" }, - "example": "13:45.30.123456789" + "example": "13:45:30.123456789" }, "OffsetTime": { "type": "string", "format": "time", "externalDocs": { "description": "As defined by 'full-time' in RFC3339", - "url": "https://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14" + "url": "https://www.rfc-editor.org/rfc/rfc3339.html#section-5.6" }, - "example": "13:45.30.123456789+02:00" + "example": "13:45:30.123456789+02:00" }, "UTC": { "type": "object",