Closed
Description
Problem statement
When generating from source, models with a json.RawMessage
, it is represented as an array of uint8 values (which is the internal representation of course). Just as a interface{}
generates a "type": "object"
it would be nice if json.RawMessage
did the same.
Swagger specification
The following model is generated:
"RawMessage": {
"description": "It implements Marshaler and Unmarshaler and can\nbe used to delay JSON decoding or precompute a JSON encoding.",
"type": "array",
"title": "RawMessage is a raw encoded JSON value.",
"items": {
"type": "integer",
"format": "uint8"
},
"x-go-package": "encoding/json"
}
Steps to reproduce
Generate a model with a json.RawMessage
field.
Command used here: swagger generate spec -m -i swagger.yaml -o ./swagger.json
Environment
swagger version: SHA-1: 8914a0f (latest master)
go version: 1.10.3
OS: windows/amd64