docs icon indicating copy to clipboard operation
docs copied to clipboard

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

Open gr2m opened this issue 5 years ago • 15 comments

What feature or product is affected?

  • [x] 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

gr2m avatar Jul 26 '20 22:07 gr2m

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

chiedo avatar Jul 27 '20 12:07 chiedo

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

chiedo avatar Jul 27 '20 14:07 chiedo

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

zeke avatar Jul 31 '20 02:07 zeke

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.

chiedo avatar Jul 31 '20 12:07 chiedo

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

github-actions[bot] avatar Sep 29 '20 16:09 github-actions[bot]

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

chiedo avatar Sep 29 '20 16:09 chiedo

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

chiedo avatar Oct 21 '20 00:10 chiedo

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

github-actions[bot] avatar Dec 20 '20 17:12 github-actions[bot]

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

github-actions[bot] avatar Feb 19 '21 17:02 github-actions[bot]

هل يعني إجراء هذا التغيير أننا سنكسر روابط الإرساء التي وضع الأشخاص إشارة مرجعية عليها بالفعل ، وإذا كان الأمر كذلك ، فهل نحن موافقون على ذلك؟

SaultanBeagama avatar Aug 12 '21 04:08 SaultanBeagama

image

mohamaed530 avatar Aug 16 '21 22:08 mohamaed530

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

DiddiLeija avatar Sep 29 '21 14:09 DiddiLeija

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.

heiskr avatar Sep 29 '21 18:09 heiskr

Payment it

Mobibaba121 avatar Dec 25 '21 18:12 Mobibaba121

Park+

fastag1

1alan91 avatar Apr 09 '22 09:04 1alan91

👋 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! 💛

cmwilson21 avatar Sep 29 '22 20:09 cmwilson21