question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Required flag generates in swagger file but not displayed

See original GitHub issue

There doesn’t appear to be consistency as to how NSwag/ReDoc displays the “Required” flag. This is what is displayed in ReDoc: image

And this is what is generated in the swagger file: { "type": "string", "name": "firstName", "in": "query", "required": true, "x-nullable": true }, { "type": "string", "name": "lastName", "in": "query", "required": true, "x-nullable": true },

I would expect to see the Required displayed in red as shown below: image

Possibly related to issue #2391

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
RicoSutercommented, Oct 1, 2019

Maybe you should create an issue here: https://github.com/Redocly/redoc

0reactions
nathanjwtxcommented, Oct 4, 2019

I created an issue and it was suggested I was running an older version of ReDoc.

How do I determine the version that NSwag references? I can’t find anywhere that it is/can be set.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Swagger editor how to specify which fields in request body ...
Switch to the "Schema" tab to see the schema documentation, that's where the field descriptions (including the required flag) are displayed. – ...
Read more >
Describing Request Body
requestBody consists of the content object, an optional Markdown-formatted description , and an optional required flag ( false by default). content lists the ......
Read more >
Hide a Request Field in Swagger API
A quick and practical guide to hiding a request field in Swagger UI.
Read more >
Show only specific APIs on Swagger — Asp.Net Core
In this article, I explain how to use Document Filters on Swagger in order to control the endpoints that are being shown on...
Read more >
Generate a server from a swagger spec
A generated server uses no reflection except for an enum validation and the required validation. The server builds all the necessary plans and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found