Skip to content
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

Use operationId for #anchor tags of REST API endpoint titles #139

Closed
1 task done
gr2m opened this issue Jul 26, 2020 · 16 comments
Closed
1 task done

Use operationId for #anchor tags of REST API endpoint titles #139

gr2m opened this issue Jul 26, 2020 · 16 comments
Labels
engineering Will involve Docs Engineering good first issue Good for newcomers help wanted Anyone is welcome to open a pull request to fix this issue

Comments

@gr2m
Copy link
Contributor

gr2m commented Jul 26, 2020

What feature or product is affected?

  • REST API

What is the new or expected behavior?

Example

https://docs.github.com/en/rest/reference/repos#check-if-vulnerability-alerts-are-enabled-for-a-repository

would become

https://docs.github.com/en/rest/reference/repos#check-vulnerability-alerts

See OpenAPI spec at https://github.com/github/openapi/blob/347c7c385184352692d4118b7e8a266ccf9b7db7/definitions/operations/repos/check-vulnerability-alerts.yml#L6

How is the old or inaccurate behavior currently documented?

n/a

Who does this affect?

Every change to an #anchor name for endpoint titles requires a change in the code, due to the error handlers which include a URL to the documentation. The endpoint titles are more prone to changes, while operation IDs should be changed much less frequently, as they are consider a breaking change to some of the OpenAPI consumers, while the "summary" key is not.

The problem with the title changes might also be amplified once translations are introduced.

@zeke sent me here, we shortly discussed it today:

image

What is the impact to users?

n/a

Content strategy and implementation

tbd

@chiedo
Copy link
Contributor

chiedo commented Jul 27, 2020

Would making this change mean we'd be breaking anchor links people already have bookmarked and if so, are we OK with that?

@chiedo
Copy link
Contributor

chiedo commented Jul 27, 2020

What level of effort would it take to make sure all of the old anchor URL as of today will redirect to the new URLs based on the operation ID when we make this change?

@zeke / @sarahs

@zeke
Copy link
Contributor

zeke commented Jul 31, 2020

I think we could pretty easily add invisible companion anchors to continue supporting the old slugs.

@chiedo
Copy link
Contributor

chiedo commented Jul 31, 2020

The obvious idea. Good thinking. Let's do both! So the old ones still work. But make the Operation ID URLs the default for anything that links to those sections.

@github-actions
Copy link
Contributor

This issue is stale because it has been open 60 days with no activity.

@chiedo
Copy link
Contributor

chiedo commented Sep 29, 2020

Still planning todo. Just taking time to get to it. Other priorities.

@zeke zeke transferred this issue from another repository Oct 6, 2020
@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label Oct 6, 2020
@zeke zeke added engineering Will involve Docs Engineering and removed triage Do not begin working on this issue until triaged by the team labels Oct 6, 2020
@chiedo
Copy link
Contributor

chiedo commented Oct 21, 2020

@nschonni this one may be worth looking at if you decide to spend more time making improvements to the codebase!

@github-actions
Copy link
Contributor

This issue is stale because it has been open 60 days with no activity.

@github-actions github-actions bot added the stale There is no recent activity on this issue or pull request label Dec 20, 2020
@janiceilene janiceilene removed the stale There is no recent activity on this issue or pull request label Dec 21, 2020
@github-actions
Copy link
Contributor

This issue is stale because it has been open 60 days with no activity.

@github-actions github-actions bot added the stale There is no recent activity on this issue or pull request label Feb 19, 2021
@chiedo chiedo added help wanted Anyone is welcome to open a pull request to fix this issue good first issue Good for newcomers and removed stale There is no recent activity on this issue or pull request labels Feb 23, 2021
@janiceilene janiceilene added needs content strategy Wait to open a PR until there's an approved content strategy in the issue and removed needs content strategy Wait to open a PR until there's an approved content strategy in the issue labels Jun 18, 2021
@SaultanBeagama

This comment has been minimized.

@mohamaed530

This comment has been minimized.

@DiddiLeija
Copy link

Hi everybody! As I can see, this issue is not resolved. Can I work on it?

@heiskr
Copy link
Contributor

heiskr commented Sep 29, 2021

I suspect it would be fine to simply switch to using the "summary key" as long as there are no duplicates on any page. I don't think we need to add "invisible companion anchors" for the current hashes, I'm concerned about added complexity and maintenance doing that. We would be happy to have an open source contributor help with this task, as we will likely not prioritize this internally.

@github-actions github-actions bot added the stale There is no recent activity on this issue or pull request label Nov 29, 2021
@Mobibaba121

This comment has been minimized.

@1alan91

This comment was marked as spam.

@cmwilson21
Copy link
Contributor

👋 Thanks all for the feedback in this issue. I spoke with the team and we are going to work on this internally. So I'm going to go ahead and close this issue.

Thanks again! 💛

jnidzwetzki pushed a commit to jnidzwetzki/docs that referenced this issue Oct 6, 2022
* Fix Issue github#139

* Fix Issue #148

* Fix Issue github#140
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engineering Will involve Docs Engineering good first issue Good for newcomers help wanted Anyone is welcome to open a pull request to fix this issue
Projects
None yet
Development

No branches or pull requests

16 participants