-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
List entities in namespace(s) #111
Merged
Merged
Conversation
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 endpoint is to return a list of entities from the desired namespace(s). Namespace(s) can be requested through the `namespace` query parameter, e.g., `/_api/entities?namespace="testing"&namespace="my/project"`.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #111 +/- ##
==========================================
+ Coverage 92.20% 93.08% +0.88%
==========================================
Files 27 29 +2
Lines 1373 1577 +204
==========================================
+ Hits 1266 1468 +202
- Misses 107 109 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
…tities-in-namespace
…tities-in-namespace
This is to be able to list namespaces as well.
…tities-in-namespace
Avoid adding __init__() for backends, instead use _initialize() (used to be initialize()).
list namespaces Will list all the namespaces as a full namespace, valid to be a value in an entity under the namespace key. list entities Will list all entities for a given namespace or multiple namespaces or all namespaces depending on the provided arguments (if any) or if the `-a/--all` option is provided. This has all been made possible through the (normally hidden) endpoints `/_api/namespaces` and `/_api/entities`. Both are GET endpoints. The endpoints will list all namespaces or all entities with a given list of namespaces (provided through the query parameter 'namespace', may be supplied multiple times - or no times).
…tities-in-namespace
This needs to be fixed concerning entity validation, since these are hard-coded with the onto-ns.com namespace.
…tities-in-namespace
The main issue here is the monkeypatch of CONFIG.base_url for a live backend, which is done in order to point to the localhost deployment, while also using the original namespace of onto-ns.com.
Integrate utility functions better with the existing code base. Utilize abstract methods in the magic methods for the Backend class.
For new API endpoints and new for service utils.py file.
…tities-in-namespace
…amespace' into cwa/close-107-list-entities-in-namespace
Treesarj
approved these changes
Jul 2, 2024
Treesarj
approved these changes
Jul 2, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #107
Add a new
list
CLI command group that adds two sub-commands:entities
andnamespaces
.list entities
will list all Entities in a givenNAMESPACE
.If a
NAMESPACE
argument is not given, the "core" namespace will be used by default.It has the option
--all-namespaces/-a
to list all Entities in all namespaces.list namespaces
will list all namespaces as fully resolved URLs.A new
/_api
router has been added to the service, it includes aGET /entities
endpoint, which accepts multiplenamespace
query parameters, and will collect and return all entities in the given namespace(s). It also includes aGET /namespaces
endpoint to return a list of all fully resolved namespaces the current service has entities in.To do: