OAI / learn.openapis.org

OpenAPI - Getting started, and the specification explained
https://learn.openapis.org/
Creative Commons Attribution 4.0 International
120 stars 60 forks source link

Updating OAS links to properly link to sections #30

Closed AdrianMachado closed 2 years ago

AdrianMachado commented 2 years ago

Issue

Link to the OAS in this document follow the camelCase format (ex. https://spec.openapis.org/oas/v3.1.0#pathItemObject). Unfortunately, this link will only have the sidebar direct you to the content, while the docs themselves (right-content) will take you to your most recently navigated to spot on the page (example) image

Suggested fix

I suggest moving to kebab-case link which will actually take you to the content in the docs, rather than requiring a second click on the sidebar. Ex. Try opening this in a new tab: https://spec.openapis.org/oas/v3.1.0#path-item-object. The sidebar won't point to the page unfortunately, but it isn't that hard to navigate and find your place

Repro

Macbook Pro, Google Chrome (latest). Command click to open doc link in new tab (as I would expect most readers to do). Once you are in the doc, click on any link to another object.

https://user-images.githubusercontent.com/11202679/160473350-7255c9d6-8964-41cb-9ab9-49df51cb29da.mov

AdrianMachado commented 2 years ago

@segfaultxavi or @mniinio could I get eyes on this please?

segfaultxavi commented 2 years ago

The rest of the site needs to be checked for this problem too, I guess?

AdrianMachado commented 2 years ago

Yup, will try and do that today