Skip to content
This repository has been archived by the owner on Aug 4, 2023. It is now read-only.

in stub mode the response is always text/plain even if this type isn't specified in the swagger document (in the produces key) #102

Closed
borisirota opened this issue Dec 23, 2014 · 1 comment

Comments

@borisirota
Copy link

Hi,

It seems that the returned value in stub mode doesn't take into account the allowed returned types specified in the swagger document.

My swagger document specifies only the 'application/json' as the produce type and an error was thrown when running stub mode with the {validateResponse: true} option sent to the swaggerValidator middleware.
You can see here https://github.com/apigee-127/swagger-tools/blob/master/middleware/helpers.js#L247 that the returned value is always text.

Thanks,
Boris

@whitlockjc
Copy link
Member

Yeah, there is already a TODO in the sources to handle this and there is a vague bug already reported (Issue #30) that suggests the need to enhance this. I'm going to close this and stick with that bug for making this happen. If you believe this is an error, please feel free to re-open.

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

No branches or pull requests

2 participants