Skip to content

Commit

Permalink
Fix time example and link (#1591)
Browse files Browse the repository at this point in the history
Signed-off-by: Phillip Kruger <phillip.kruger@gmail.com>
phillip-kruger authored Oct 4, 2023

Verified

This commit was signed with the committer’s verified signature.
henryiii Henry Schreiner
1 parent 21cbaef commit 7f017ed
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -91,20 +91,20 @@ 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)
.example("P1D")
.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<DotName, TypeWithFormat> TYPE_MAP = new LinkedHashMap<>();
public static final IndexView jdkIndex;
Original file line number Diff line number Diff line change
@@ -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",

0 comments on commit 7f017ed

Please sign in to comment.