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

How can I change the response content-type of my sdk? #1046

Closed
Iuriiiii opened this issue Sep 24, 2024 · 4 comments
Closed

How can I change the response content-type of my sdk? #1046

Iuriiiii opened this issue Sep 24, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers question Further information is requested

Comments

@Iuriiiii
Copy link

Hi! I tried Nestia for a interesting personal project, i created the endpoint health that returns a single ! character on text/plain format

How can I tell Nestia to make this specific endpoint to be a different content type than application/json?

@samchon samchon added the question Further information is requested label Sep 24, 2024
@samchon samchon self-assigned this Sep 24, 2024
@samchon
Copy link
Owner

samchon commented Sep 24, 2024

@TypedRoute.Get() supports only application/json type.

If you want other thing, just use NestJS's original @Get() decorator.

@Iuriiiii
Copy link
Author

Thanks for your quick answer! I'm using NestJS decorators
image

May Nestia not ready to handle other content-type than app/json yet?

@Iuriiiii
Copy link
Author

I'll close this question then! Thanks for you job! This project is amazing, i'll try to send you a pr to solve this detail!

@samchon
Copy link
Owner

samchon commented Sep 25, 2024

Current @nestia/sdk supports the @Header("Content-Type", "text/plain") decorator, but I've forgotten the @ApiProduces().

I'll make it to be supported in today @Iuriiiii

@samchon samchon reopened this Sep 25, 2024
@samchon samchon added enhancement New feature or request good first issue Good for newcomers labels Sep 25, 2024
samchon added a commit that referenced this issue Sep 25, 2024
Close #1046: support ``@ApiProduces()` decorator of `@nestjs/swagger`
@github-project-automation github-project-automation bot moved this from To do to Done in Nestia v3 Update Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers question Further information is requested
Projects
No open projects
Status: Done
Development

No branches or pull requests

2 participants