Use deterministic id attributes for headers in the html spec. #5115
Replies: 3 comments 10 replies
-
|
The HTML output is generated from a tool called respec, so we're not in control of some of those implementation details. While the spec.openapis.org site is the canonical resource, I wonder if your use case might be better served by taking the content from the markdown source. You can find the releases in the |
Beta Was this translation helpful? Give feedback.
-
|
Hi @valerii15298, The Fixed Fields are typically the first subsection of an Xxx Object, for example the Request Body Object. The Xxx Object sections have stable and deterministic ids, for example Why not link to the Xxx Object sections? |
Beta Was this translation helpful? Give feedback.
-
|
The JSON Schema specification notes that the contents of |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Context
I am building a tool similar to swagger editor. And I wanna implement hover tooltips for fields in the spec.
So far I have been using
$commentfield from https://spec.openapis.org/oas/3.2/schema/2025-09-17.htmlLike in this instace to display hover tooltip for
parameterSince most tools(Monaco-editor for example) expect markdown for tooltip hovers I use original markdown spec file from this repo, parse it and extract needed markdown based on
$commentfield from the schema. (parsing html is not an option because html => markdown is not reliable result)JS sample code
---> The above will produce a map
id=>contentwhereidis id html attribute from the html spec andcontentis original markdown content for that id.The problem arises with
fixed-fieldsid:Because ids for
Fixed Fieldsheadings are incremented globally with a number, for my case I just cannot extract tooltip information for specific field.Proposal
Can we use deterministic id attributes across the html spec?
So that it would be possible for people to parse original markdown and construct the same id attributes.
Instead of this: https://spec.openapis.org/oas/v3.2#fixed-fields-10
Use id something like this `https://spec.openapis.org/oas/v3.2#request-body-object--fixed-fields
Question
Is there a better way to extract markdown content for specific OpenAPI document field programmatically?
Beta Was this translation helpful? Give feedback.
All reactions