[VAULT-5887] TypeInt64 support added to OpenApi Spec generation (#15104)
Adding handling for TypeInt64 to OAS types
This commit is contained in:
parent
2907464b96
commit
f38248f5e5
|
@ -0,0 +1,3 @@
|
|||
```release-note:bug
|
||||
sdk: Fix OpenApi spec generator to properly convert TypeInt64 to OAS supported int64
|
||||
```
|
|
@ -613,6 +613,9 @@ func convertType(t FieldType) schemaType {
|
|||
ret.format = "lowercase"
|
||||
case TypeInt:
|
||||
ret.baseType = "integer"
|
||||
case TypeInt64:
|
||||
ret.baseType = "integer"
|
||||
ret.format = "int64"
|
||||
case TypeDurationSecond, TypeSignedDurationSecond:
|
||||
ret.baseType = "integer"
|
||||
ret.format = "seconds"
|
||||
|
|
|
@ -356,6 +356,10 @@ func TestOpenAPI_Paths(t *testing.T) {
|
|||
Description: "a header value",
|
||||
AllowedValues: []interface{}{"a", "b", "c"},
|
||||
},
|
||||
"maximum": {
|
||||
Type: TypeInt64,
|
||||
Description: "a maximum value",
|
||||
},
|
||||
"format": {
|
||||
Type: TypeString,
|
||||
Description: "a query param",
|
||||
|
|
|
@ -113,6 +113,11 @@
|
|||
"type": "string",
|
||||
"description": "a header value",
|
||||
"enum": ["a", "b", "c"]
|
||||
},
|
||||
"maximum" : {
|
||||
"type": "integer",
|
||||
"description": "a maximum value",
|
||||
"format": "int64"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue