Incorrect Anchor Links for Section Navigation in Stoplight Elements
Description: In my project, when rendering an API documentation page using the Stoplight Element component, I encounter an issue when clicking on the section links (e.g., "Request", "Response", "Body"). The anchor link displayed on hover is incorrect.
Steps to Reproduce:
- Render an API documentation page with sections like Request, Response, and Body using Stoplight Elements.
- Click on any section link like "Request" or "Response".
- Notice that when hovering over "Request", the URL changes to
http://localhost:4206/#Request, instead of the expected URL structure:http://localhost:4206/documentation/platform/http-apis/operations/get-todos#Request. - This is in contrast to the working behavior on the Stoplight Elements demo project (https://elements-demo.stoplight.io/operations/get-todos#Request), where the section link navigation works as expected.
Expected Behavior:
The section links should generate the correct anchor URL, similar to the behavior observed in the demo project:
http://localhost:4206/documentation/platform/http-apis/operations/get-todos#Request.
Actual Behavior:
Currently, the anchor links are incorrect, resulting in URLs like http://localhost:4206/#Request.
"paths": { "/a/appx/todos": { "get": { "summary": "List Todos", "responses": { "200": { "description": "Returns a list of Todos", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Todos" } }, "examples": { "List of Todos": { "$ref": "#/components/examples/multiple-todos" } } } } }, "403": { "$ref": "#/components/responses/Unauthorized" }, "404": { "$ref": "#/components/responses/NotFound" } }, "operationId": "get-todos", "description": "Returns a list of todos\n\n*Markdown is supported in descriptions. Add information here for users to get accustomed to endpoints*", "parameters": [ { "$ref": "#/components/parameters/limit" } ], "security": [] } } }