Skip to content

link from descriptions to other operations #1107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
x12a1f opened this issue Apr 1, 2015 · 6 comments
Closed

link from descriptions to other operations #1107

x12a1f opened this issue Apr 1, 2015 · 6 comments
Milestone

Comments

@x12a1f
Copy link

x12a1f commented Apr 1, 2015

It would be nice if you can link to other operations from the description.

For example, if you add the description using markdown somewhere with:

To delete use the [DELETE /pet/{petId}](#!/pet/deletePet) operation.

It is rendered correctly but when you click on the link, the url in the url bar of the browser is updated but the documentation does not scroll to the correct location.

@webron
Copy link
Contributor

webron commented Apr 1, 2015

We've had a discussion on it in the google group, but it feels like the solution should come from the spec itself. There's an open issue - OAI/OpenAPI-Specification#239.

@x12a1f
Copy link
Author

x12a1f commented Apr 1, 2015

Ah, yes, that would also be a nice solution but it would be sufficient if clicking on an anchor link just works in swagger. Currently it only scrolls to the correct operation when the page is opened the first time.
So if somehow the same code is executed when clicking on an anchor link it would work.

@webron
Copy link
Contributor

webron commented Apr 1, 2015

Right, but the problem is that the anchor is generated and its logic can change, and since we don't officially have our own MD extensions (which would be defined in the spec), it would be difficult to implement (or rather maintain).

@x12a1f
Copy link
Author

x12a1f commented Apr 1, 2015

Yes, you are right. If the generated anchors change a lot it will be difficult to maintain...

@webron webron added this to the future milestone May 4, 2015
@fehguy
Copy link
Contributor

fehguy commented Dec 7, 2015

I'm going to close this out as there is a mechanism for doing so with external docs in the 2.0 spec.

@fehguy fehguy closed this as completed Dec 7, 2015
@ksimka
Copy link

ksimka commented Mar 29, 2017

@fehguy Can you please give an example of how can this be done (inline local links)?

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

No branches or pull requests

4 participants