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

chore: apply proper type to each @ApiQuery decorator in the API contr… #311

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RobbyUitbeijerse
Copy link

Hi!

The hosted OpenAPI spec that is abstracted from the @ApiProperty decorators using @nestjs/swagger is missing certain types. This is easy to check by simply opening the OpenAPI spec and checking the very first method and it's input parameters.

Screenshot 2024-11-07 at 16 31 07

The schema type the input parameter address is set to {} - this causes request client generators like OpenAPI generator to interpret the parameter as an object, rather than the desired string.

To mitigate this, I simply added the type property in every @ApiQuery decorator instance, which should lead to proper output in the OpenAPI spec.

Let me know if you would like to see any changes here.

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

Successfully merging this pull request may close these issues.

1 participant