Skip to content

Discover api-doc url from Link header#145

Merged
xadahiya merged 3 commits intoHTTP-APIs:developfrom
priyanshunayan:automate-api-doc-discovery
Jun 17, 2020
Merged

Discover api-doc url from Link header#145
xadahiya merged 3 commits intoHTTP-APIs:developfrom
priyanshunayan:automate-api-doc-discovery

Conversation

@priyanshunayan
Copy link
Copy Markdown
Member

@priyanshunayan priyanshunayan commented May 14, 2020

Fixes #102

Checklist

  • My branch is up-to-date with upstream/develop branch.
  • Everything works and tested for Python 3.5.2 and above.

Description

Instead of appending 'vocab' after entry point url, this PR retrieves api doc url from the Link header according to the Hydra spec.

Change logs

Added parsing of Link header to discover the API DOC URL.

@chrizandr
Copy link
Copy Markdown
Member

Please check why tests are failing.

@priyanshunayan
Copy link
Copy Markdown
Member Author

The tests were failing due to imcompatiblity between old and new pip versions. They are fixed in #144 now.

@priyanshunayan
Copy link
Copy Markdown
Member Author

priyanshunayan commented Jun 3, 2020

@xadahiya Do we need to cache data if there is no known synchronisation mechanism to the agent? The reason being, even the APIDOC can get outdated making the cache totally invalid. And also what will be the rules to update the cache, for eg how frequently it will need to update itself, if the server is not hydrus?

@chrizandr
Copy link
Copy Markdown
Member

chrizandr commented Jun 9, 2020

Without the sync mechanism both the API Doc and the data is retrieved in real time. We make requests for every query.

Also rebase this with the branch containing the latest tests

@priyanshunayan priyanshunayan force-pushed the automate-api-doc-discovery branch from 3010b4a to 3b00a0d Compare June 11, 2020 15:12
@priyanshunayan
Copy link
Copy Markdown
Member Author

Reverting changes for now, as it went beyond what could be done in a week. This should solve the #102 and agent will continue to work with hydrus.

@priyanshunayan priyanshunayan marked this pull request as ready for review June 11, 2020 15:27
Copy link
Copy Markdown
Member

@xadahiya xadahiya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@xadahiya xadahiya merged commit 76bcb1d into HTTP-APIs:develop Jun 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants