-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Return GET /search as OPTIMADE or not
Add possibility to return responses from `GET /search` as an OPTIMADE entry-listing response or as the "standard" gateway query response. In doing this, some things have been optimized. Mainly the logic surrounding retrieving and naming databases in the `POST /search` endpoint. In order to return a query response as a valid OPTIMADE response, a method has been added to the `QueryResource` model, which works similarly to `GET /gateways/<id>/structures`, but working from the basis of the finished query. It updates the entry `id`s by prepending the `provider/database/` name, making the `id`s unique. Extra safety has been added to the creation of gateway resources, as the `resource_factory()` now expects a pre-treating `GatewayCreate` entity, where there are no "unknown" database `id`s in the `database_ids` attribute. Unknown meaning that all `database_ids` must be represented in the `databases` attribute.
- Loading branch information
Showing
10 changed files
with
280 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.