From 67e40939c3459758ff1fe21e23a5281c2fc85070 Mon Sep 17 00:00:00 2001 From: Axel RICHARD Date: Wed, 15 Jan 2025 16:39:11 +0100 Subject: [PATCH] [fix] Fix swagger APIs update with Sirius Web 2025.1.1 Signed-off-by: Axel RICHARD --- .../syson/sysml/rest/api/SysMLv2SerializerConfig.java | 3 +++ .../assets/attachments/sirius-web-openapi.json | 2 +- .../modules/user-manual/pages/release-notes/2025.2.0.adoc | 8 +++++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/backend/services/syson-sysml-rest-api-services/src/main/java/org/eclipse/syson/sysml/rest/api/SysMLv2SerializerConfig.java b/backend/services/syson-sysml-rest-api-services/src/main/java/org/eclipse/syson/sysml/rest/api/SysMLv2SerializerConfig.java index 807511dae..580a6b16b 100644 --- a/backend/services/syson-sysml-rest-api-services/src/main/java/org/eclipse/syson/sysml/rest/api/SysMLv2SerializerConfig.java +++ b/backend/services/syson-sysml-rest-api-services/src/main/java/org/eclipse/syson/sysml/rest/api/SysMLv2SerializerConfig.java @@ -28,11 +28,14 @@ import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice; +import io.swagger.v3.oas.annotations.Hidden; + /** * Custom JSON ResponseBodyAdvice for SysMLv2 Elements. * * @author arichard */ +@Hidden @ControllerAdvice("org.eclipse.sirius.web.application.object.controllers") public class SysMLv2SerializerConfig implements ResponseBodyAdvice { diff --git a/doc/content/modules/user-manual/assets/attachments/sirius-web-openapi.json b/doc/content/modules/user-manual/assets/attachments/sirius-web-openapi.json index 0dbfa364b..16989049c 100644 --- a/doc/content/modules/user-manual/assets/attachments/sirius-web-openapi.json +++ b/doc/content/modules/user-manual/assets/attachments/sirius-web-openapi.json @@ -1 +1 @@ -{"openapi":"3.0.1","info":{"title":"OpenAPI definition","version":"v0"},"paths":{"/api/rest/projects/{projectId}":{"get":{"tags":["project-rest-controller"],"description":"Get project with the given id (projectId).","operationId":"getProjectById","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Project"}}}}}},"put":{"tags":["project-rest-controller"],"description":"Update the project with the given id (projectId).","operationId":"updateProject","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"name","in":"query","required":false,"schema":{"type":"string"}},{"name":"description","in":"query","required":false,"schema":{"type":"string"}},{"name":"branch","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Branch"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Project"}}}}}},"delete":{"tags":["project-rest-controller"],"description":"Delete the project with the given id (projectId).","operationId":"deleteProject","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Project"}}}}}}},"/api/rest/projects":{"get":{"tags":["project-rest-controller"],"description":"Get all projects.","operationId":"getProjects","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Project"}}}}}}},"post":{"tags":["project-rest-controller"],"description":"Create a new project with the given name and description (optional).","operationId":"createProject","parameters":[{"name":"name","in":"query","required":true,"schema":{"type":"string"}},{"name":"description","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Project"}}}}}}},"/api/rest/projects/{projectId}/commits":{"get":{"tags":["commit-rest-controller"],"description":"Get all the commits in the given project.","operationId":"getCommits","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Commit"}}}}}}},"post":{"tags":["commit-rest-controller"],"description":"Create a new commit with the given change (collection\nof DataVersion records) in the given branch of the\nproject. If the branch is not specified, the default branch\nof the project is used. Commit.change should include\nthe following for each Data object that needs to be\ncreated, updated, or deleted in the new commit. (1)\nCreating Data - Commit.change should include a\nDataVersion record with DataVersion.payload\npopulated with the Data being created.\nDataVersion.identity is not provided, thereby indicating\nthat a new DataIdentity needs to be created in the new\ncommit. (2) Updating Data - Commit.change should\ninclude a DataVersion record with DataVersion.payload\npopulated with the updated Data. DataVersion.identity\nshould be populated with the DataIdentity for which a\nnew DataVersion record will be created in the new\ncommit. (3) Deleting Data - Commit.change should\ninclude a DataVersion record with DataVersion.payload\nnot provided, thereby indicating deletion of DataIdentity\nin the new commit. DataVersion.identity should be\npopulated with the DataIdentity that will be deleted in\nthe new commit. When a DataIdentity is deleted in a\ncommit, all its versions (DataVersion) are also deleted,\nand any references from other DataIdentity are also\nremoved to maintain data integrity. In addition, for\nElement Data (KerML), deletion of an Element must\nalso result in deletion of incoming Relationships. When\nElement Data (KerML) is created or updated, derived\nproperties must be computed or verified if the API\nprovider claims Derived Property Conformance.\n","operationId":"createCommit","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"branchId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Commit"}}}}}}},"/api/rest/projects/{projectId}/commits/{commitId}":{"get":{"tags":["commit-rest-controller"],"description":"Get the commit with the given id (commitId) in the given project.","operationId":"getCommitById","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"commitId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Commit"}}}}}}},"/api/rest/projects/{projectId}/commits/{commitId}/roots":{"get":{"tags":["object-rest-controller"],"description":"Get all the root elements in the given project at the given commit.","operationId":"getRootElements","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"commitId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"type":"object"}}}}}}}},"/api/rest/projects/{projectId}/commits/{commitId}/elements":{"get":{"tags":["object-rest-controller"],"description":"Get all the elements in a given project at the given commit.","operationId":"getElements","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"commitId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"type":"object"}}}}}}}},"/api/rest/projects/{projectId}/commits/{commitId}/elements/{relatedElementId}/relationships":{"get":{"tags":["object-rest-controller"],"description":"Get relationships that are incoming, outgoing, or both relative to the given related element.","operationId":"getRelationshipsByRelatedElement","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"commitId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"relatedElementId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"direction","in":"query","required":false,"schema":{"type":"string","enum":["IN","OUT","BOTH"]}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"type":"object"}}}}}}}},"/api/rest/projects/{projectId}/commits/{commitId}/elements/{elementId}":{"get":{"tags":["object-rest-controller"],"description":"Get element with the given id (elementId) in the given project at the given commit.","operationId":"getElementById","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"commitId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"elementId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}}}},"/api/rest/projects/{projectId}/commits/{commitId}/changes":{"get":{"tags":["commit-rest-controller"],"description":"Get the change in the given commit of the given project.","operationId":"getCommitChange","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"commitId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"changeTypes","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","enum":["CREATED","UPDATED","DELETED"]}}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DataVersion"}}}}}}}},"/api/rest/projects/{projectId}/commits/{commitId}/changes/{changeId}":{"get":{"tags":["commit-rest-controller"],"description":"Get the change with the given id (changeId) in the given commit of the given project. The changeId is the id of the DataVersion that changed in the commit.","operationId":"getCommitChangeById","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"commitId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"changeId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/DataVersion"}}}}}}}},"components":{"schemas":{"Branch":{"required":["@id","created","name","owningProject","referencedCommit"],"type":"object","properties":{"created":{"type":"string","description":"The timestamp at which the CommitReference was created","format":"date-time"},"head":{"$ref":"#/components/schemas/Identified"},"name":{"type":"string","description":"The name of the Branch"},"owningProject":{"$ref":"#/components/schemas/Identified"},"referencedCommit":{"$ref":"#/components/schemas/Identified"},"@id":{"type":"string","description":"The UUID assigned to the record","format":"uuid"},"@type":{"type":"string"}},"description":"Branch is an indirect subclass of Record (via CommitReference) that represents an independent line of development in a Project. A Project can have 1 or more Branches. When a Project is created, a default Branch is also created. The default Branch of a Project can be changed, and a Project can have only 1 default Branch."},"Identified":{"type":"object","properties":{"@id":{"type":"string","format":"uuid"}},"description":"The commit referenced by the Branch"},"Project":{"required":["@id","defaultBranch","name"],"type":"object","properties":{"created":{"type":"string","format":"date-time"},"defaultBranch":{"$ref":"#/components/schemas/Identified"},"description":{"type":"string","description":"The statement that provides details about the record"},"name":{"type":"string","description":"The name of the Project"},"@id":{"type":"string","description":"The UUID assigned to the record","format":"uuid"},"@type":{"type":"string"}},"description":"Project is a subclass of Record that represents a container for other Records and an entry point for version management and data navigation."},"Commit":{"type":"object","properties":{"created":{"type":"string","format":"date-time"},"description":{"type":"string"},"owningProject":{"$ref":"#/components/schemas/Identified"},"previousCommits":{"type":"array","items":{"$ref":"#/components/schemas/Identified"}},"@id":{"type":"string","format":"uuid"},"@type":{"type":"string"}}},"DataIdentity":{"required":["@id"],"type":"object","properties":{"@id":{"type":"string","description":"The UUID assigned to the record","format":"uuid"},"@type":{"type":"string"}},"description":"DataIdentity is a subclass of Record that represents a unique, version-independent representation of Data through its lifecycle. A DataIdentity is associated with 1 or more DataVersion records that represent different versions of the same Data."},"DataVersion":{"required":["@id"],"type":"object","properties":{"identity":{"$ref":"#/components/schemas/DataIdentity"},"payload":{"type":"object","description":"The Payload assigned to the record"},"@id":{"type":"string","description":"The UUID assigned to the record","format":"uuid"},"@type":{"type":"string"}},"description":"DataVersion is a subclass of Record that represents Data at a specific version in its lifecycle. A DataVersion record is associated with only one DataIdentity record. DataVersion serves as a wrapper for Data (payload) in the context of a Commit in a Project."}}}} \ No newline at end of file +{"openapi":"3.0.1","info":{"title":"OpenAPI definition","version":"v0"},"servers":[{"url":"http://localhost:8080","description":"Generated server url"}],"paths":{"/api/rest/projects/{projectId}":{"get":{"tags":["project-rest-controller"],"description":"Get project with the given id (projectId).","operationId":"getProjectById","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"404":{"description":"Not Found"},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}}}},"put":{"tags":["project-rest-controller"],"description":"Update the project with the given id (projectId).","operationId":"updateProject","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"name","in":"query","required":false,"schema":{"type":"string"}},{"name":"description","in":"query","required":false,"schema":{"type":"string"}},{"name":"branch","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Branch"}}],"responses":{"404":{"description":"Not Found"},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}}}},"delete":{"tags":["project-rest-controller"],"description":"Delete the project with the given id (projectId).","operationId":"deleteProject","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"204":{"description":"No content"}}}},"/api/rest/projects":{"get":{"tags":["project-rest-controller"],"description":"Get all projects.","operationId":"getProjects","parameters":[{"name":"page[size]","in":"query","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"page[after]","in":"query","required":false,"schema":{"type":"string"}},{"name":"page[before]","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Project"}}}}}}},"post":{"tags":["project-rest-controller"],"description":"Create a new project with the given name and description (optional).","operationId":"createProject","parameters":[{"name":"name","in":"query","required":true,"schema":{"type":"string"}},{"name":"description","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}}}}},"/api/rest/projects/{projectId}/commits":{"get":{"tags":["commit-rest-controller"],"description":"Get all the commits in the given project.","operationId":"getCommits","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"404":{"description":"Not Found"},"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Commit"}}}}}}},"post":{"tags":["commit-rest-controller"],"description":"Create a new commit with the given change (collection\nof DataVersion records) in the given branch of the\nproject. If the branch is not specified, the default branch\nof the project is used. Commit.change should include\nthe following for each Data object that needs to be\ncreated, updated, or deleted in the new commit. (1)\nCreating Data - Commit.change should include a\nDataVersion record with DataVersion.payload\npopulated with the Data being created.\nDataVersion.identity is not provided, thereby indicating\nthat a new DataIdentity needs to be created in the new\ncommit. (2) Updating Data - Commit.change should\ninclude a DataVersion record with DataVersion.payload\npopulated with the updated Data. DataVersion.identity\nshould be populated with the DataIdentity for which a\nnew DataVersion record will be created in the new\ncommit. (3) Deleting Data - Commit.change should\ninclude a DataVersion record with DataVersion.payload\nnot provided, thereby indicating deletion of DataIdentity\nin the new commit. DataVersion.identity should be\npopulated with the DataIdentity that will be deleted in\nthe new commit. When a DataIdentity is deleted in a\ncommit, all its versions (DataVersion) are also deleted,\nand any references from other DataIdentity are also\nremoved to maintain data integrity. In addition, for\nElement Data (KerML), deletion of an Element must\nalso result in deletion of incoming Relationships. When\nElement Data (KerML) is created or updated, derived\nproperties must be computed or verified if the API\nprovider claims Derived Property Conformance.\n","operationId":"createCommit","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"branchId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Commit"}}}}}}},"/api/rest/projects/{projectId}/commits/{commitId}":{"get":{"tags":["commit-rest-controller"],"description":"Get the commit with the given id (commitId) in the given project.","operationId":"getCommitById","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"commitId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"404":{"description":"Not Found"},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Commit"}}}}}}},"/api/rest/projects/{projectId}/commits/{commitId}/roots":{"get":{"tags":["object-rest-controller"],"description":"Get all the root elements in the given project at the given commit.","operationId":"getRootElements","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"commitId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":[{"@id":"9f2e43d4-2f7e-49f1-816a-a4e0d3d1f370","attribute1":"hello"},{"@id":"bab1f7be-82e0-4d14-bc60-b12a60c46f2f","attribute1":"bye"}]}}},"404":{"description":"Not Found"}}}},"/api/rest/projects/{projectId}/commits/{commitId}/elements":{"get":{"tags":["object-rest-controller"],"description":"Get all the elements in a given project at the given commit.","operationId":"getElements","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"commitId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":[{"@id":"9f2e43d4-2f7e-49f1-816a-a4e0d3d1f370","attribute1":"hello"},{"@id":"bab1f7be-82e0-4d14-bc60-b12a60c46f2f","attribute1":"bye"}]}}},"404":{"description":"Not Found"}}}},"/api/rest/projects/{projectId}/commits/{commitId}/elements/{relatedElementId}/relationships":{"get":{"tags":["object-rest-controller"],"description":"Get relationships that are incoming, outgoing, or both relative to the given related element.","operationId":"getRelationshipsByRelatedElement","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"commitId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"relatedElementId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"direction","in":"query","required":false,"schema":{"type":"string","enum":["IN","OUT","BOTH"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":[{"@id":"9f2e43d4-2f7e-49f1-816a-a4e0d3d1f370","attribute1":"hello"},{"@id":"bab1f7be-82e0-4d14-bc60-b12a60c46f2f","attribute1":"bye"}]}}},"404":{"description":"Not Found"}}}},"/api/rest/projects/{projectId}/commits/{commitId}/elements/{elementId}":{"get":{"tags":["object-rest-controller"],"description":"Get element with the given id (elementId) in the given project at the given commit.","operationId":"getElementById","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"commitId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"elementId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"404":{"description":"Not Found"},"200":{"description":"OK","content":{"application/json":{"example":{"@id":"9f2e43d4-2f7e-49f1-816a-a4e0d3d1f370","attribute1":"hello"}}}}}}},"/api/rest/projects/{projectId}/commits/{commitId}/changes":{"get":{"tags":["commit-rest-controller"],"description":"Get the change in the given commit of the given project.","operationId":"getCommitChange","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"commitId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"changeTypes","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","enum":["CREATED","UPDATED","DELETED"]}}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DataVersion"}}}}},"404":{"description":"Not Found"}}}},"/api/rest/projects/{projectId}/commits/{commitId}/changes/{changeId}":{"get":{"tags":["commit-rest-controller"],"description":"Get the change with the given id (changeId) in the given commit of the given project. The changeId is the id of the DataVersion that changed in the commit.","operationId":"getCommitChangeById","parameters":[{"name":"projectId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"commitId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"changeId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataVersion"}}}},"404":{"description":"Not Found"}}}}},"components":{"schemas":{"Branch":{"required":["@id","@type","created","name","owningProject","referencedCommit"],"type":"object","properties":{"@id":{"type":"string","description":"The UUID assigned to the record","format":"uuid"},"@type":{"type":"string","description":"Branch"},"created":{"type":"string","description":"The timestamp at which the Branch was created, in ISO8601DateTime format","format":"date-time"},"head":{"$ref":"#/components/schemas/Identified"},"name":{"type":"string","description":"The name of the Branch"},"owningProject":{"$ref":"#/components/schemas/Identified"},"referencedCommit":{"$ref":"#/components/schemas/Identified"}},"description":"Branch is an indirect subclass of Record (via CommitReference) that represents an independent line of development in a Project. A Project can have 1 or more Branches. When a Project is created, a default Branch is also created. The default Branch of a Project can be changed, and a Project can have only 1 default Branch."},"Identified":{"type":"object","properties":{"@id":{"type":"string","format":"uuid"}},"description":"Identified represents an Object through its ID and type."},"Project":{"required":["@id","@type","created","defaultBranch","name"],"type":"object","properties":{"@id":{"type":"string","description":"The UUID assigned to the record","format":"uuid"},"@type":{"type":"string","description":"Project"},"created":{"type":"string","description":"The creation timestamp for the Project, in ISO8601DateTime format","format":"date-time"},"defaultBranch":{"$ref":"#/components/schemas/Identified"},"description":{"type":"string","description":"The statement that provides details about the record"},"name":{"type":"string","description":"The name of the Project"}},"description":"Project is a subclass of Record that represents a container for other Records and an entry point for version management and data navigation."},"Commit":{"required":["@id","@type","created","owningProject","previousCommits"],"type":"object","properties":{"@id":{"type":"string","description":"The UUID assigned to the record","format":"uuid"},"@type":{"type":"string","description":"Commit"},"created":{"type":"string","description":"The timestamp at which the Commit was created, in ISO8601DateTime format","format":"date-time"},"description":{"type":"string","description":"The statement that provides details about the record"},"owningProject":{"$ref":"#/components/schemas/Identified"},"previousCommits":{"type":"array","description":"The set of immediately preceding Commits","items":{"$ref":"#/components/schemas/Identified"}}},"description":"Commit is a subclass of Record that represents the changes made to a Project at a specific point in time in its lifecycle, such as the creation, update, or deletion of data in a Project. A Project has 0 or more Commits."},"DataIdentity":{"required":["@id","@type"],"type":"object","properties":{"@id":{"type":"string","description":"The UUID assigned to the record","format":"uuid"},"@type":{"type":"string","description":"DataIdentity"}},"description":"DataIdentity is a subclass of Record that represents a unique, version-independent representation of Data through its lifecycle. A DataIdentity is associated with 1 or more DataVersion records that represent different versions of the same Data."},"DataVersion":{"required":["@id","@type","identity"],"type":"object","properties":{"@id":{"type":"string","description":"The UUID assigned to the record","format":"uuid"},"@type":{"type":"string","description":"DataVersion"},"identity":{"$ref":"#/components/schemas/DataIdentity"},"payload":{"type":"object","description":"Data if exists in the commit, null otherwise"}},"description":"DataVersion is a subclass of Record that represents Data at a specific version in its lifecycle. A DataVersion record is associated with only one DataIdentity record. DataVersion serves as a wrapper for Data (payload) in the context of a Commit in a Project."}}}} \ No newline at end of file diff --git a/doc/content/modules/user-manual/pages/release-notes/2025.2.0.adoc b/doc/content/modules/user-manual/pages/release-notes/2025.2.0.adoc index cd4ad4544..6cb47f495 100644 --- a/doc/content/modules/user-manual/pages/release-notes/2025.2.0.adoc +++ b/doc/content/modules/user-manual/pages/release-notes/2025.2.0.adoc @@ -19,7 +19,7 @@ For example, if a `PartDefinition` already define 5 parts, then a new `Part` cre - A new experimental view named _Query_ is available in SysON, allowing to query the models. -image::release-notes-query-view.png[Query View, width=75%,height=75%] +image::release-notes-query-view.png[Query View, width=85%,height=85%] This view allows to write some AQL queries (see AQL documentation for more details) and get the result of the queries written. [WARNING] @@ -29,10 +29,12 @@ It will be improved release after release, with new variables and services, but ==== Only one variable is accessible for now, `editingContext` which represent the current project. From this context, you can use the following services: + - `Collection allContents()`: allows to retrieve all contents recursively (documents, and each element of all models) present in your editing context. Please use this service very carefully as it can retrieve thousands elements very easily and may also lead to performance issues. - `Collection contents()`: allows to retrieve all contents (documents) present in your editing context. - `Object getObjectById(String id)`: from its ID, allows to retrieve an object (a document or a SysMLv2 model Element) present in your editing context. + [WARNING] ==== The use of this _Query_ view requires knowledge of AQL and also a good knowledge of the SysMLv2 language (attributes, references, operations). @@ -40,13 +42,13 @@ The use of this _Query_ view requires knowledge of AQL and also a good knowledge Here are some examples of AQL queries applied on a simple project: - The following example uses the `getObjectById` service with an ID as parameter, corresponding to the _Package 1_ element (its ID has been retrieved from the _Advanced_ tab in _Details_ view). -image::release-notes-query-view-getObjectById.png[Query View getObjectById, width=75%,height=75%] +image::release-notes-query-view-getObjectById.png[Query View getObjectById, width=85%,height=85%] The result is _Package 1_. - The following example uses the `ownedMember` reference from the SysMLv2 language, applied on _Package 1_ element. -image::release-notes-query-view-ownedMember.png[Query View ownedMember, width=75%,height=75%] +image::release-notes-query-view-ownedMember.png[Query View ownedMember, width=85%,height=85%] The result is _part1_ and _action1_, you can see also them in the _Explorer_ view on the left side, as members of _Package 1_.