swagger-test-templates icon indicating copy to clipboard operation
swagger-test-templates copied to clipboard

descriptions containing single quotes do not get escaped.

Open svenvarennes opened this issue 7 years ago • 0 comments

Use double quotes, see following swagger schema:

DownForMaintenance: description: "We're currently down for maintenance." schema: $ref: "#/definitions/Error" headers: content-type: description: "Response content-type" type: string

Will generate tests that fail:

it('should respond with 503 We're currently down for...', function(done) {

it('should respond with 503 We < HEREBEPROBLEM >'< ENDPROBLEM > re currently down for...', function(done) {

I.e. the first value passed to it, if contains a single quote results in the it statement being open and breaking the code.

svenvarennes avatar Dec 01 '17 14:12 svenvarennes