Skip to content

Commit

Permalink
backport of commit be4979d (hashicorp#21002)
Browse files Browse the repository at this point in the history
Co-authored-by: Anton Averchenkov <84287187+averche@users.noreply.github.com>
  • Loading branch information
1 parent 68ae0e8 commit 71433b9
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 @@ -828,8 +828,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 71433b9

Please sign in to comment.