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

Response codes not appearing in generated swagger #135

Open
nudabagana opened this issue Jun 4, 2020 · 1 comment
Open

Response codes not appearing in generated swagger #135

nudabagana opened this issue Jun 4, 2020 · 1 comment

Comments

@nudabagana
Copy link

nudabagana commented Jun 4, 2020

So, not sure if I'm doing something incorrectly, but here, I use this code:

	@Path('/test')
	@POST
	async test() {
		throw new Errors.NotFoundError('Not Found');
	}

Then I generate swagger. But the error response does not appear in generated swagger.
Am I missing something?

@rlcjf0014
Copy link

I use typescript-rest-swagger to generate swagger based on my code and to show response in your swagger, you need to use the @response decorator.

@Response<{ Your Response value }>(statusCode, message)

Try searching for the typescript-rest-swagger module.

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

No branches or pull requests

2 participants