Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenAPI Description Decorator not Properly Escaped #68

Open
mkamadeus opened this issue Mar 3, 2021 · 2 comments
Open

OpenAPI Description Decorator not Properly Escaped #68

mkamadeus opened this issue Mar 3, 2021 · 2 comments

Comments

@mkamadeus
Copy link

As what the title says; description text is not properly escaped.

When I tried to give a description containing ' (single quote), the documentation stops completely, e.g:

@OpenAPI({
  description: "Get all student's LO",
  responses: {
    "200": {
      description: "OK",
    },
  },
})

When the single quote is removed, it works fine.

@OpenAPI({
  description: "Get all students LO",
  responses: {
    "200": {
      description: "OK",
    },
  },
})

A simple solution would be escaping the single quote with some regex or similar things.

@mikeguta
Copy link
Contributor

mikeguta commented May 4, 2021

I can't reproduce this issue @mkamadeus
routing-controllers-openapi doesn't do the serialization, it just builds the OpenAPIObject which the consuming application can choose to serialize. What symptom did you encounter?
I'm assuming some sort of tool failed to parse the output in your case. Do you remember what the tool was? Can you still reproduce the issue?

@mkamadeus
Copy link
Author

@mikeguta Ah, I see. I used Redoc to display the documentation. I'll check again when I got the time to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants