v3: How to require a multipart form data field?
See original GitHub issueIt is possible to require a specific field in multipart form data in v2 but I don’t see any notion of this in v3 spec and Swagger docs.
v2: https://swagger.io/docs/specification/2-0/file-upload/, Upload a File + Other Data
title has a sample.
v3: https://swagger.io/docs/specification/describing-request-body/multipart-requests/, https://swagger.io/docs/specification/describing-request-body/file-upload/, none includes the word require
.
Am I looking for it in the wrong place or is it something not put intentionally or even forgotten?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How to specify a multipart form field is optional in OpenAPI ...
Expected: Detail a multipart/form-data requestBody with some fields required and some optional. In the code example above, foo should be a ...
Read more >Multipart Requests - Swagger
You start with the requestBody/content keyword. Then, you specify the media type of request data. File uploads typically use the multipart/form-data media type, ......
Read more >Define multipart form data - GeeksforGeeks
Approach: In this example, we are creating a simple HTML form (uploading.html) for uploading an image file to the server. The server will ......
Read more >Uploads, multipart/form-data & UploadedFile - SymfonyCasts
Create a totally new, temporary endpoint: public function temporaryUploadAction() . We're going to create an HTML form in our template, put an input...
Read more >withMultiPartFormData - PactumJS
const { spec } = require('pactum'); const FormData = require('form-data-lite'); const form = new FormData(); form.append('file', fs.readFileSync ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Aha, I found it. We need to set an array
required
and put the required fields’ name there.But this is not explicitly cited in docs. I better propose a change for it.
You just need to provide the the ‘required as’