-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Closed
Description
i am using swagger in golang, and here's the endpoint:
"/xmltest":{
"get":{
"produces":["application/xml"],
"operationId":"xmltest",
"responses":{
"200":{
"description":"OK",
"schema":{
"type":"array",
"items":{
"$ref":"#/definitions/Channel"
},
"xml":{"name":"Channels"}
}
}
}
}
}
and definition:
"Channel":{
"type":"object",
"xml":{"name":"Channel", "version":"1.0.0", "encoding":"utf-8"},
"properties":{
"id":{
"format":"int32",
"type":"integer"
},
"name":{
"type":"string"
}
}
}
in the response, i am always get <Channel><ID>1</ID><Name>Abc</Name></Channel> while i am expecting <?xml version="1.0" encoding="utf-8"?><Channel><ID>1</ID><Name>Abc</Name></Channel>, how can i make it happen?
Metadata
Metadata
Assignees
Labels
No labels