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

supportedSubmitMethods option missing from type SwaggerOptions.uiConfig in index.d.ts #626

Open
2 tasks done
roeeyud opened this issue Jun 28, 2022 · 2 comments
Open
2 tasks done

Comments

@roeeyud
Copy link
Contributor

roeeyud commented Jun 28, 2022

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the bug has not already been reported

Fastify version

5.1.0 and 5.2.0

Plugin version

No response

Node.js version

16.15.0

Operating system

Windows

Operating system version (i.e. 20.04, 11.3, 10)

11

Description

Working with typescript export type SwaggerOptions from file index.d.ts is missing supportedSubmitMethods: Array<string>

This field is useful to remove the "Try it out" Button entirely or only for specific methods
See https://swagger.io/docs/open-source-tools/swagger-ui/usage/configuration/ for more details

Thank you so much for all the effort you put in ❤️

Steps to Reproduce

While coding simply try to add the following uiConfig object to SwaggerOptions

 uiConfig: {
    supportedSubmitMethods: [],
    docExpansion: "full",
    deepLinking: false,
  },

Expected Behavior

Typescript should recognize supportedSubmitMethods, if you add // @ts-ignore the field actually works

@mcollina
Copy link
Member

Thanks for reporting! Would you like to send a Pull Request to address this issue? Remember to add unit tests.

@roeeyud
Copy link
Contributor Author

roeeyud commented Jun 28, 2022

No way I can say no to the great Matteo !
It will be an honor 😃
Should be ready in a day or two

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