fastify / fastify-swagger

Swagger documentation generator for Fastify
MIT License
889 stars 199 forks source link

Doesn't show file select option on swagger 3.0.0 version #800

Open 11laflame opened 2 months ago

11laflame commented 2 months ago

Prerequisites

Fastify version

4.23.2

Plugin version

8.14.0

Node.js version

20.13.1

Operating system

Linux

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

Ubuntu 22.04.3 LTS

Description

Fastify-swagger & fastify-multipart setup with request.file() logic in validation

Doesn't see on UI select file option, on swagger 2.0.0 version it suggests to send binary, which is not ux oriented When I set body instead of requestBody in schema, UI is present but generates bad request response

image

Link to code that reproduces the bug

https://github.com/11laflame/swagger-ui-bug

Expected Behavior

UI should be presented and works good with fastify-multipart

mcollina commented 2 months ago

Would you like to send a PR to implement this?

11laflame commented 2 months ago

Currently have no time, but maybe will take a look soon what we can do