-
-
Notifications
You must be signed in to change notification settings - Fork 209
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
Example not working with TS project because of swagger-schema-official types bug #269
Comments
Would you like to send a Pull Request to address this issue? Remember to add unit tests. |
Actually I am still digging into this. It seems that |
it's also one of the things that is mostly requested in this module. |
Hi guys, I just upgraded to fastify v3 to use |
@benediktdertinger are you using |
@fox1t thanks for your fast reply! If I'm using the default setup from the README I'm getting the error you described. What seems to be interesting: If I remove the section My setup:
|
@benediktdertinger User definition in the example is not working because of the
Removing these makes the example work again. It is only a TS issue because of the missing types on the swagger side. Can you open a new issue and add a repro repository for the blank page? |
@mcollina since |
Go for it |
@fox1t yes, I already did this (as described above). If I remove the User definition the error is gone and the HTML page is created but it is blank. Any idea on this? Should I open another Issue? |
@fox1t If I remove
By removing |
@benediktdertinger would you mind to make a PR to fix the example? Just remove the broken parts. After it, we will handle the black page issue. |
🐛 Bug Report
The example provided in the README.md doesn't work with typescript because Schema type doesn't have .
This is a swagger-schema-official types bug and i am writing it here just for reference.
To Reproduce
Just copy-paste the example in a TS project and you will get:
Digging more into this i found that leaving just one of the nullable fields displays the correct error.
Object literal may only specify known properties, and 'nullable' does not exist in type 'Schema'
this is the Schema definition:
Expected behavior
No error at all.
Your Environment
The text was updated successfully, but these errors were encountered: