-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…311) 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](https://block-explorer-api.mainnet.zksync.io/docs-json) and checking the very first method and it's input parameters. <img width="790" alt="Screenshot 2024-11-07 at 16 31 07" src="https://github.com/user-attachments/assets/088623ab-e6f8-40d7-b0a9-a1175488b138"> The schema type the input parameter `address` is set to `{}` - this causes request client generators like [OpenAPI generator](https://github.com/OpenAPITools/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. Co-authored-by: Vasyl Ivanchuk <[email protected]>
- Loading branch information
1 parent
dc26198
commit ad1dc14
Showing
1 changed file
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters