Repository navigation
[Bug]: PIM DTOs deviate from the normative API PIM model (ptc-25-02-29) #388
Copy link
Copy link
Open
Description
What type of issue is this?
- Bug report
- Feature request
Prerequisites
- I have written a descriptive issue title
- I have verified that I am running the latest version of the SysML2.NET
- I have searched open and closed issues to ensure it has not already been reported
Description
Several SysML2.NET.PIM.DTO types deviate from the normative Systems Modeling API and
Services PIM UML model (OMG document ptc-25-02-29). Two of the four make parts of the API
model unrepresentable, so a PSM mapping cannot round-trip. Each deviation below is confirmed
by both the UML model and the §7.1 prose.
| # | Member | Normative PIM | Current | Effect |
|---|---|---|---|---|
| 1 | PrimitiveConstraint |
generalizes Constraint |
no base type | Query.where is typed Constraint, so no query condition with a leaf is assignable. Only CompositeConstraint specializes Constraint today. §7.1.4: "PrimitiveConstraint is a concrete subtype of Constraint". |
| 2 | Query.project |
project : Project [1..1] |
absent | The owning project of a Query cannot be represented; callers must thread it in out-of-band. |
| 3 | Commit.previousCommit |
previousCommits : Commit [0..*] |
Guid PreviousCommit |
A merge commit cannot record more than one predecessor. Deviates on both multiplicity and name. |
| 4 | CompositeConstraint.constraint |
Constraint [2..*] (explicit lower=2) |
List<Constraint>, no lower bound |
A composite with 0 or 1 operands is accepted. §7.1.4: "composed of two or more Constraints". |
Item 1 is the most severe: QueryService::createQuery and Query.where cannot carry any
real filter.
Members present in the normative model but absent from the PIM DTOs:
Commit.change : DataVersion [1..*]andCommit.versionedData : DataVersion [0..*]
(changeis mandatory, and is an input ofcreateCommit)Project.branches : Branch [1..*],Project.tags,Project.commitReferences
(§7.1.2: "A Project can have 1 or more branches")Query.orderBy : String [0..*]DataVersion.project : Project [1..1]
And PrimitiveConstraint.value is [1..*] in the model; the SDK's List<string> Value = []
carries no lower bound.
Steps to Reproduce
PIM/DTO/PrimitiveConstraint.csdeclarespublic class PrimitiveConstraintwith no base,
whilePIM/DTO/CompositeConstraint.csis: Constraint. Assigning aPrimitiveConstraint
toQuery.Wheredoes not compile.PIM/DTO/Query.cs— noProjectmember, noOrderBymember.PIM/DTO/Commit.cs—PreviousCommitisGuid; noChangeorVersionedDatamembers.PIM/DTO/Project.cs— noBranches,TagsorCommitReferencesmembers.
System Configuration
- SysML2.NET version: 0.24.1
- Environment (Operating system, version and so on): Windows 11, any
- .NET Framework version: net10.0 / netstandard2.1
- Additional information: found while implementing the REST/HTTP PSM mapping in
mycelium-fabric, where items 1 and 2 are currently worked around by answering501for
primitive constraints and threading the project id in from the route.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
Fix #388