swagger-api / swagger-api/swagger-ui
Markdown link open a new tab/window
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
- swagger-ui version: v3.0.21
swagger: '2.0'
info:
version: "1.0.0-alpha"
title: Answer to life
description: |
# Documentation
This endpoint can solve the problems of the world:
[look at its specification](#/WorldEndpoint)
paths:
# endpoints
/:
get:
summary: the answer is 42
description: |
# Information
for understanding this endpoint you have to have a look at the
[Documentation](#/Documentation)
operationId: getanswer
tags:
- WorldEndpoint
responses:
200:
description: The api information is returned.
Using this example is impossible to have a normal navigation between the two generated paragraph.
The link from the "Documentation" section open a new tab/window.
The link from the endpoint it isn't referring the paragraph.
As a solution I would like to suggest these two things:
- intercept the default href behaviour and add the "preventdefault" and the call to the "scrolltosource" (into the Markdown provider)
- add ids to the h1 - h3 header in order to use the solution mentioned above.
the problem has been tested here: http://editor.swagger.io/#/
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the example in editor.swagger.io and start by locating the Markdown provider mentioned in the issue. Verify that links stay in the current window and navigate to the corresponding rendered heading; done means both the Documentation and endpoint links provide normal in-page navigation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100