mkdocs-plugins icon indicating copy to clipboard operation
mkdocs-plugins copied to clipboard

OpenAPI docs - Table of Contents?

Open wadewilliams opened this issue 1 year ago • 3 comments

In this screenshot, you can see a table of contents displayed on the right of the page.

image

This doesn't seem to be the current behavior. Is this possibly a regression or is there some specific option that needs to be set in order for it to work properly?

My markdown file has no contents besides the tag for [OAD("./docs/swagger-config.json")]

wadewilliams avatar Sep 17 '24 18:09 wadewilliams

I have the same question.

Any help would be appreciated, Neoteroi! 😀 Thanks

JegDudley avatar Oct 14 '24 16:10 JegDudley

@wadewilliams - I was able to get the table of contents working by building my docs using @RobertoPrevato/ Neoterio's essentials-openapi, instead of mkdocs-plugins.

I followed the instructions here: https://github.com/Neoteroi/essentials-openapi

and built them to markdown output format.

JegDudley avatar Oct 14 '24 18:10 JegDudley

In my hands the TOC only shows up if the file lacks a top-level header.

So, this shows NO TOC:

# title

[OAD(./docs/specification.yaml)]

this file does show the TOC:

[OAD(./docs/specification.yaml)]

It would be nice to be able to embed the docs into an existing structure, and still include it in the TOC, like:

# Spec

## Introduction

blah blah blah

## Formal spec

[OAD(./docs/specification.yaml)]

This will show only the 'introduction' in the TOC,

It would be nice if you could include a top-level header apart from the auto-rendered openapi docs.

nsheff avatar Mar 05 '25 16:03 nsheff