openapi: Fix generated types for duration strings (#20841)

This commit is contained in:
Anton Averchenkov 2023-06-05 13:25:55 -04:00 committed by GitHub
parent 0bd356f6cd
commit be4979dfbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

3
changelog/20841.txt Normal file
View File

@ -0,0 +1,3 @@
```release-note:improvement
openapi: Fix generated types for duration strings
```

View File

@ -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: