Skip to content

Make OpenAPI specs collapsible and add constraint-aware rendering - #255

Merged
mgks merged 4 commits into
docmd-io:mainfrom
w666:feature-collapsable-openapi-operations
Oct 14, 2026
Merged

mgks merged 4 commits into
docmd-io:mainfrom
w666:feature-collapsable-openapi-operations

Conversation

@w666

@w666 w666 commented Oct 8, 2026

Copy link
Copy Markdown
Contributor
  • Add collapsible OpenAPI operation blocks with configurable initial state (expanded / collapsed)
  • Add a side TOC menu for easier navigation through endpoints and sections
  • Support schema validation constraints in rendered output, including min/max length, items, properties, numeric bounds, patterns, and unique items
  • Resolve referenced request bodies and schema component
  • Improve markdown and $ref handling
  • Add CLI contract coverage for the plugin behavior

Close #254

TOC and bullet points in the description are rendered the same way as in SwaggerHub

Operations are collapsible, there is an icon that helps notice it. In plugins config you can configure render it collapsed. Default state is expanded for backward compatibility.

image

Description and examples merged into one cell, cause previos version worked bad for long items.

image

Simple types with basic examples still look good

image

When renders complex type it moves the next column with the description and examples to the side, so not all content visible, but I don't really know how to solve this problem yet. But this is acceptable for now IMO

image

Here is my plugin config

image

Type of change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📝 Documentation update

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

w666 added 4 commits October 8, 2026 21:02
 - Add collapsible OpenAPI operation blocks with configurable initial state (expanded / collapsed)
 - Add a side TOC menu for easier navigation through endpoints and sections
 - Support schema validation constraints in rendered output, including min/max length, items, properties, numeric bounds, patterns, and unique items
 - Resolve referenced request bodies and schema component
 - Improve markdown and $ref handling
 - Add CLI contract coverage for the plugin behavior

 Close docmd-io#254
@mgks
mgks merged commit ce23352 into docmd-io:main Oct 14, 2026
1 check passed
@mgks

mgks commented Oct 14, 2026

Copy link
Copy Markdown
Member

Thank you @w666 for this comprehensive improvement! 🚀

The collapsible OpenAPI operation blocks, TOC integration, rich schema constraints, referenced request body handling, and runtime dependency additions for markdown-it and js-yaml have all been merged into main (commit ce23352). This will be part of the upcoming release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Make OpenAPI oprations collapsable

2 participants