Required body parameters are not marked as such
See original GitHub issueSwagger UI 2.2.8
It looks like Swagger UI 2.2.8 doesn’t mark body parameters as required, though Swagger Editor does. Apologies if it’s been logged, I can’t seem to fund much on it.
Roger



'/items/{idItem}':
post:
summary: Insert an item
parameters:
- $ref: '#/parameters/IdItemInPath'
- in: body
name: body
description: Post item payload
required: true
schema:
$ref: "#/definitions/ItemPost"
definitions:
ItemPost:
required:
- idShot
- styleGroupNumber
- colorCode
properties:
idShot:
type: integer
format: int32
brand:
type: string
description: length limited to 255 chars
color:
type: string
description: length limited to 255 chars
colorCode:
type: string
description: length limited to 255 chars
departmentNumber:
type: string
description: length limited to 255 chars
description:
type: string
description: text column, allows for 21,844 chars
liveDate:
type: string
format: date
description: YYYY-DD-MM
price:
type: number
format: float
styleGroupNumber:
type: string
vpn:
type: string
description: vendor product number. length limited to 255 chars
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
c# - Body parameter required with swagger 4.0 Asp.net core 2.2
How to mark a property as required in Swagger, without ASP. ... The parameter is required, and a JSON object will not tell...
Read more >Swagger PUT/POST body value issue
It looks like [ApiMember(ParameterType = "body")] is incorrectly retaining the name of the property its decorating, and including that in the ...
Read more >Describing Parameters - Swagger
Required and Optional Parameters. By default, Swagger treats all request parameters as optional. You can add required: true to mark a parameter as...
Read more >Specify Parameters - SQL Server - Microsoft Learn
Variables can be user-defined or system variables such as @@spid. ... It is not necessary to provide a value for an optional parameter...
Read more >Request and Response JSON Reference | Alexa Skills Kit
The request body contains the parameters necessary for the service to perform its ... Requests that are not customer-initiated, such as the AudioPlayer ......
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 Free
Top 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

I’m having the same problem in version 3.19.0. I have following request body
and someFile is:
In the UI I don’t see any red asterix etc. Should I raise another issue for that ?
Any updates on this issue. How has this gone unnoticed for so long?