question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

After a few deep dives into links, I’ve found–and others have pointed out many times–that there are some issues in the documentation of links.

  • The href field is not documented as intended. It was not supposed to point to a target resource–rather to the location to an operation definition
  • There is no way to define a different server location. During a TDC call we discussed with @lcrabb the desire to allow target servers to be defined as part of the response but we decided it would be too difficult

I suggest that we rename href to something more clear to ensure it’s not confused with the target href. We clarify the purpose as a way to link to the operation instead. The reason is that because operationId is optional, it may be necessary to provide a JSON reference to locate an operation. For example:

http://gigantic-server.net/foo/bar/operations#/superDuperOperation

This will be especially (or almost solely) useful when we talk about remote definitions of operations.

I also suggest that we revisit the target server locator. We can add a server field which holds a single Server Object which we can use the same templating mechanism for. Thus we can use request or response information to define target hosts.

When we brought up the target server computation previously, we hadn’t developed the templating mechanism. Now that it’s baked (thanks @darrelmiller !) we should use it here.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
darrelmillercommented, Apr 12, 2017

I believe http://gigantic-server.net/foo/bar/operations just points to a JSON/YAML document that contains fragments of an OpenAPI definition. You could do http://gigantic-server.net/myApi/open-api#/paths/~path~to~resource/get also, with the caveat about escaping the /.

I’d rather not introduce another JSON querying mechanism. JSON Path doesn’t have a formal spec as far as I know and it is overkill for most of our needs.

0reactions
fehguycommented, Apr 12, 2017

Sorry for the lag responding. There is definitely some room for issues in here. The goal is to represent a locator to an operation ID inside an OAS doc–with that said, I think it makes sense to restrict the reference to live “in a valid OpenAPI Specification document” so the context of path and http method can be detected.

I will modify the PR to take this into account.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Link an issue | Jira Software Cloud - Atlassian Support
You can link issues to keep track of duplicate or related work across all projects in your Jira Software Cloud site.
Read more >
Issue Links
With no arguments searches for all issues that have any link. With one argument, searches for issues that have the specified link.
Read more >
Linking a pull request to an issue - GitHub Docs
You can link a pull request to an issue by using a supported keyword in the pull request's description or in a commit...
Read more >
Troubleshooting link issues - Squarespace Help Center
Most issues with links on Squarespace sites happen when there are errors with the linked URL. You can resolve many of these errors...
Read more >
How to Fix Broken Links On Your Website - Monsido
Broken links may also directly harm SEO rankings by sending signals ... checking broken links, unlike many other potential website issues, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found