swagger icon indicating copy to clipboard operation
swagger copied to clipboard

Incorrect type and format for int64 and time.Time in swagger models

Open robskie opened this issue 9 years ago • 1 comments

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".

robskie avatar Jun 15 '15 08:06 robskie

This is correct, please fix this ;) I might have time to look at this also.

esiqveland avatar Oct 24 '15 10:10 esiqveland