Feature: add external tools model to expose it in catalog links#22
Open
Imene-Amirat wants to merge 8 commits into
Open
Feature: add external tools model to expose it in catalog links#22Imene-Amirat wants to merge 8 commits into
Imene-Amirat wants to merge 8 commits into
Conversation
…/external-tools-model
There was a problem hiding this comment.
Pull request overview
Adds support for representing external tools both as catalog-level resources (discoverable via hypermedia links) and as user-associated embedded objects, and introduces an editWith submission metadata field for pointing to an external editor.
Changes:
- Add a new
LinkedData::Models::ExternalToolmodel and expose it via a newexternal_toolslink in the MOD catalog. - Add a new embedded
LinkedData::Models::Users::ExternalToolmodel and wire it intoUserasexternalTools. - Add
editWithtoOntologySubmissionand the ontology submission scheme YAML.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/ontologies_linked_data/models/users/user.rb | Adds externalTools attribute and embeds it alongside subscription. |
| lib/ontologies_linked_data/models/users/external_tool.rb | Introduces an embedded per-user external tool object (currently includes an API key). |
| lib/ontologies_linked_data/models/ontology_submission.rb | Adds editWith metadata attribute for submissions. |
| lib/ontologies_linked_data/models/mod/semantic_artefact_catalog.rb | Adds catalog link for external_tools and requires the new model. |
| lib/ontologies_linked_data/models/external_tool.rb | Adds top-level ExternalTool model for catalog exposure. |
| config/schemes/ontology_submission.yml | Reformats scheme content and adds editWith field (currently introduces YAML trailing-comma issues). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+2
to
+8
| class ExternalTool < LinkedData::Models::Base | ||
| model :user_external_tool, name_with: lambda { |inst| uuid_uri_generator(inst) } | ||
| attribute :toolName, enforce: [:existence] | ||
| attribute :apikey, enforce: [:existence] | ||
| attribute :user, inverse: {on: :user, attribute: :externalTools} | ||
| embedded true | ||
| end |
Comment on lines
+30
to
+34
| description: | ||
| [ | ||
| "OMV: The URI of the ontology which is described by these metadata.", | ||
| "MOD: The Unique Resoource Identifier of this ontology, assigned by responsible authority.", | ||
| ] |
Comment on lines
+1130
to
+1134
| "http://schema.org/name": "schema:name", | ||
| "http://xmlns.com/foaf/0.1/name": "foaf:name", | ||
| "http://purl.org/dc/terms/title": "dcterms:title", | ||
| "http://purl.org/dc/elements/1.1/title": "dc:title", | ||
| } |
This file contains hidden or 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
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.
No description provided.