Skip to content
This repository was archived by the owner on May 15, 2023. It is now read-only.
This repository was archived by the owner on May 15, 2023. It is now read-only.

descriptions containing single quotes do not get escaped. #165

@svenvarennes

Description

@svenvarennes

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions