Skip to content

Commit

Permalink
[protoc-gen-openapi] Fix the Timestamp Format (#310) (#330)
Browse files Browse the repository at this point in the history
* fix the timestamp format. (#310)
* update openapi_default_response.yaml to expect "date-time" instead of "RFC3339".
  • Loading branch information
jeffsawatzky authored Apr 5, 2022
1 parent e282a44 commit 44c9037
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ components:
readOnly: true
type: string
description: The previous borrowing timestamp.
format: RFC3339
format: date-time
created_at:
readOnly: true
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ components:
readOnly: true
type: string
description: The previous borrowing timestamp.
format: RFC3339
format: date-time
createdAt:
readOnly: true
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ components:
readOnly: true
type: string
description: The previous borrowing timestamp.
format: RFC3339
format: date-time
createdAt:
readOnly: true
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ components:
readOnly: true
type: string
description: The previous borrowing timestamp.
format: RFC3339
format: date-time
createdAt:
readOnly: true
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ components:
readOnly: true
type: string
description: The previous borrowing timestamp.
format: RFC3339
format: date-time
createdAt:
readOnly: true
type: string
Expand Down
2 changes: 1 addition & 1 deletion cmd/protoc-gen-openapi/generator/wellknown/schemas.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func NewGoogleApiHttpBodySchema() *v3.SchemaOrReference {
func NewGoogleProtobufTimestampSchema() *v3.SchemaOrReference {
return &v3.SchemaOrReference{
Oneof: &v3.SchemaOrReference_Schema{
Schema: &v3.Schema{Type: "string", Format: "RFC3339"}}}
Schema: &v3.Schema{Type: "string", Format: "date-time"}}}
}

// google.type.Date is serialized as a string
Expand Down

0 comments on commit 44c9037

Please sign in to comment.