swagger
swagger copied to clipboard
Incorrect type and format for int64 and time.Time in swagger models
Hi! Given the following struct:
type ExampleStruct struct {
IntValue int64 `json:"intval"`
TimeValue time.Time `json:"timeval"`
}
The following swagger models are currently generated:
"models": {
"pkg.ExampleStruct: {
"id": "pkg.ExampleStruct",
"properties": {
"intval": {
"type": "int64",
"description": "",
"items": {},
"format": ""
},
"timeval: {
"type": "Time",
"description": "",
"items": {},
"format": ""
}
}
}
}
According to this, intval
type should be "integer" and format should be "int64, and timeval
type should be "string" and format should be "date-time".
This is correct, please fix this ;) I might have time to look at this also.