Issue: Swagger UI is displaying the response body incorrectly
I Expect it to display the array of strings that definition describes
Instead it displays my definition object as the response body
Disclaimer: I am making an assumption here that swagger definition objects correlate to json-schema definitions. That may be the source of my issue here.
Background: The response body contains an array of the IDs of steps that are part of instructions, and the order of those IDs describe their sequence. More at Google Groups
"InstructionSequence": {
"title": "InstructionSequence",
"description": "The sequence of steps that make up the Instructions",
"type": "array",
"items": {
"type": "string"
}
}
"/instructions/{ID}/sequence": {
"get": {
//...
"responses": {
"200": {
"description": "Instruction's Sequence",
"schema": {
"$ref": "InstructionSequence",
"example": [
"stepID",
"stepID",
"stepID"
]
}
}
}
}
}

May relate to #713 ?
Your definition is fine, and it is indeed a bug (possibly in swagger-js). Yes, quite possibly related to #713.
One thing to note - you _cannot_ mix $ref with any other property, so your usage of example in the response is invalid. If you want to include it, you have to include it in the schema definition.
Thanks @webron. Makes me think of a relevant piece of info...
I have tried this without a $ref: definition as well. Meaning that I have put the schema info directly in the response section. Different results, but still doesn't give what I would expect..
"/instructions/{ID}/sequence": {
"get": {
//...
"responses": {
"200": {
"description": "Instruction's Sequence",
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
}
}

Yes, that relates to a different bug that inline schema definitions are not parsed properly (can't remember the #, but the issue exists).
@webron
Is this fixed?
My Rest API returns array of array of strings without key values, how can that be modelled in swagger?
[
"1459451302225",
"INFO",
"INFO\taudit\t20,225\tRequest GET
/rest/foo&skip=0&limit=25
exesults count: 10 (Status
200 OK) 135ms",
"admin"
]
It should be fixed, yes.