Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix time example and link #1591

Merged
merged 1 commit into from
Oct 4, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down