-1

Hi i am interested to know how to add the custom text section in the API documentation like this example site: https://api-reference.rebilly.com/#section/Introduction. I am using asp.net core 6 and i have configured Redoc but unable to add the text section in the API documentation. i have also tried to follow the answer in this question. Add textual sections to Swagger using Swashbuckle

But didn't find any luck. Any help would be appreciated.

i have also tried to follow the answer in this question. Add textual sections to Swagger using Swashbuckle

But didn't find any luck. Any help would be appreciated.

1 Answers1

0

To get the introduction like this, use markdown in the info.description field of your OpenAPI description. You can add headings, links, whatever you want to present to your users at the top of the page.

Click the "Download" link at the top of the reference docs you linked to - this will give you the OpenAPI file that this documentation was built from as an example.

Lorna Mitchell
  • 1,819
  • 13
  • 22
  • I had fixed the. I formatted data in the markdown file and read the text from the markdown file and assign it to description property in the SwaggerDoc function. Now the issue i was facing was how to create the tree if i have 3 section on the left side menu how can i group then into one heading. like Getting Started (it should be the expandable side bar menu item) - Introduction (child item) - How to perform operation (child item) – TechDev Apr 03 '23 at 11:53
  • The navigation bar entries (at least when rendered with Redoc) respect the headings in the Markdown, use a top-level heading for a group heading, then a subheading for the introduction. As I mentioned, the example you linked is quite a good guide. – Lorna Mitchell Apr 06 '23 at 10:35