Skip to content

Commit

Permalink
openapi: Fix generated types for duration strings (hashicorp#20841)
Browse files Browse the repository at this point in the history
  • Loading branch information
averche committed Jun 5, 2023
1 parent 0bd356f commit be4979d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions changelog/20841.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:improvement
openapi: Fix generated types for duration strings
```
4 changes: 2 additions & 2 deletions sdk/framework/openapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -922,8 +922,8 @@ func convertType(t FieldType) schemaType {
ret.baseType = "integer"
ret.format = "int64"
case TypeDurationSecond, TypeSignedDurationSecond:
ret.baseType = "integer"
ret.format = "seconds"
ret.baseType = "string"
ret.format = "duration"
case TypeBool:
ret.baseType = "boolean"
case TypeMap:
Expand Down

0 comments on commit be4979d

Please sign in to comment.