After we moved loopback4 apidocs main page to this repo, the base link for it has been changed which invalidates our existing apidocs links in the docs.
Additionally, some of the links with anchors to them are non-descriptive and seem easily subject to change (e.g. link to apidocs for Context's get is http://apidocs.loopback.io/@loopback%2fdocs/context.html#216; the anchor is not #get). We should either address this directly by adjusting strong-docs, or have a standard procedure for linking to code/apidocs so that they're not prone to breaking.
_See Reporting Issues for more tips on writing good issues_
sounds like a bug. Do we know enough to put down acceptance criteria? or should just put it in the backlog?
There's two parts to this issue: fixing the links and finding a way to keep the links maintainable. Fixing the links themselves are straightforward enough, but making the links maintainable is a strong-docs issue (I think). @raymondfeng is there a limit to strong-docs on making this change not feasible to implement?
In discussion with @raymondfeng @bajtos , fixing the links should be part of DP3.
For the longer term solution, we need to have a qualified names to make the function and properties unique. This should be part of Core-GA, if we cannot make it for DP3.
Rejecting because @virkt25 raised the issue of hotfix being very short term since the links are volatile and may need numerous updates.
In JavaScript-based documentation (think LB 2.x/3.x), we are using descriptive anchors that don't change over time, for example http://apidocs.loopback.io/loopback/#app-listen for app.listen().
IMO, we should use a similar algorithm to build anchors for TypeScript-based documentation too. For Context.prototype.get(), I would expect an anchor like #context-get, not the current #216.
To me, that's the most important change/fix to do as part of this issue. The sooner we make that change, the less broken links we will have to update.
[email protected] contains the fix to set anchor id with qualified name. For example:
After we moved loopback4 apidocs main page to this repo, the base link for it has been changed which invalidates our existing apidocs links in the docs.
@shimks Please elaborate the issue ^^^.
An example of link to our apidocs in loopback.io: http://apidocs.loopback.io/@loopback%2fopenapi-v3/#29
The correct link: http://apidocs.loopback.io/@loopback%2fdocs/openapi-v3.html#233
We need to update the docs/READMEs so that these correctly point to the current apidocs.
I searched through loopback-next but didn't find such links. Can you tell which file has the wrong link?
I took the example from Decorators.md. We might need to search for apidocs in our repository to make sure that all of the apidocs links are valid.
Most helpful comment
In JavaScript-based documentation (think LB 2.x/3.x), we are using descriptive anchors that don't change over time, for example http://apidocs.loopback.io/loopback/#app-listen for
app.listen().IMO, we should use a similar algorithm to build anchors for TypeScript-based documentation too. For
Context.prototype.get(), I would expect an anchor like#context-get, not the current#216.To me, that's the most important change/fix to do as part of this issue. The sooner we make that change, the less broken links we will have to update.