swaggo / swag

Automatically generate RESTful API documentation with Swagger 2.0 for Go.
MIT License
10.24k stars 1.17k forks source link

maxlength and minlength are not supported for files #1818

Open Jack21c opened 2 months ago

Jack21c commented 2 months ago

I have set maxlength for file parameter // @Param table formData file true "Таблица" maxlength(52428800) And swag said that :maxLength is attribute to set to a number.

But when I set maxlength for string parameter // @Param region path string false "Регион" maxlength(20) swag initialized without errors.

How should I set max size of file by swagger?


swag version: 1.16.3 go version: 1.21.6 OS: Windows App: Visual Studio Code

sdghchj commented 1 month ago

No way so far. A PR is needed.