Skip to content

Commit

Permalink
Added Instant to DateTime types
Browse files Browse the repository at this point in the history
Signed-off-by: Phillip Kruger <phillip.kruger@gmail.com>
  • Loading branch information
phillip-kruger committed Apr 6, 2021
1 parent a6a854d commit fcbc5c3
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ public class TypeUtil {
TYPE_MAP.put(DotName.createSimple(java.time.LocalDateTime.class.getName()), DATE_TIME_FORMAT);
TYPE_MAP.put(DotName.createSimple(java.time.ZonedDateTime.class.getName()), DATE_TIME_FORMAT);
TYPE_MAP.put(DotName.createSimple(java.time.OffsetDateTime.class.getName()), DATE_TIME_FORMAT);
TYPE_MAP.put(DotName.createSimple(java.time.Instant.class.getName()), DATE_TIME_FORMAT);

// Duration
TYPE_MAP.put(DotName.createSimple(java.time.Duration.class.getName()), DURATION_FORMAT);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,23 @@
},
"/fruits/{fid}/notes/{nid}": {
"get": {
"parameters": [
"parameters": [
{
"name": "fid",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "nid",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
"name": "fid",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "nid",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"404": {
Expand All @@ -59,7 +59,7 @@
"schemas": {
"Note": {
"description": "A `Note` is an immutable text annotation with an associated MIME type. ",
"required": [
"required": [
"created",
"creator",
"id",
Expand All @@ -69,9 +69,10 @@
"type": "object",
"properties": {
"modified": {
"format": "date-time",
"description": "When the entity was modified as a Unix timestamp.",
"type": "object",
"example": 0
"type": "string",
"example": "0"
},
"modifier": {
"format": "uuid",
Expand All @@ -82,9 +83,10 @@
"type": "string"
},
"created": {
"format": "date-time",
"description": "When the entity was created as a Unix timestamp. For create operations, this will not need to be defined.",
"type": "object",
"example": 0,
"type": "string",
"example": "0",
"nullable": false
},
"creator": {
Expand Down Expand Up @@ -132,4 +134,4 @@
}
}
}
}
}

0 comments on commit fcbc5c3

Please sign in to comment.