model.query() does not return unnamed connectors/allocations/flows, satisfy usages, or metadata usages
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Start at the model.query() and model.to_api_json() entry points, using the reported Python and inline SysML reproduction if available. Compare the elements exposed by the query with those present in json.loads(model.to_api_json().content), including unnamed usages, SatisfyRequirementUsage, and MetadataUsage. Done means the intended API behavior is confirmed and the query surface and documentation consistently describe all supported elements.
Written by the indexing model from the issue text.
Description
Summary
model.query() returns named allocation, connection and flow elements by @type, but omits the same kind of element when it is unnamed, and omits every SatisfyRequirementUsage and MetadataUsage regardless of naming. All of them are present in json.loads(model.to_api_json().content).
Version: OpenSysML v0.9.0.
Observed
For a model that loads with ok=True:
- (a) a named
allocation,connectionorflowusage is returned bymodel.query(where={"@type": ..., ...}). - (b) the same element declared without a name is not returned by the equivalent query.
- (c)
satisfy r by subject;(which cannot take a name) is never returned asSatisfyRequirementUsageviamodel.query(), and neither is aMetadataUsage, named or not. - A named
perform action x : Ausage is returned with typeActionUsage. - The members a part inherits from its supertype are not listed for the subtype via
model.query().
Reference
SysML API and Services v1.0 (formal/2026-03-04), 7.2.2 ElementNavigationService (printed p. 27): getElements(project, commit) is documented as "Get all the elements in a given project at the given commit," and the Query API Model (Figure 7, printed p. 24) does not scope this to named elements.
Request
Please confirm whether model.query() is intended to correspond to the API's element queries over all elements of the commit. If so, unnamed connectors, satisfy usages and metadata usages should be selectable by @type the same way named ones are. If the current behavior (named elements only, no satisfy/metadata usages) is intentional, it would help to say so in the documentation, since right now the JSON export (to_api_json()) and the query surface disagree about what's in the model.
Repro
Happy to provide a minimal reproduction script (Python + inline SysML source) on request.
- Dominant language
- Go
- Stars
- 24
- Forks
- 5
- Avg merge
- 10h 7m
- Merged PRs (30d)
- 536
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Open-MBEE/OpenSysML
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 38/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
Maintainers usually reply within 1 day
All issues in Open-MBEE/OpenSysML
Similar issues
-
bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
DataDog/dd-trace-go#5469 ·
Maintainers usually reply within 1 day
-
bug tests
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
l3montree-dev/devguard#3101 ·
Maintainers usually reply within 1 day
-
area:*of bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
oapi-codegen/oapi-codegen#2593 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 85/100
DaoCloud/DaoCloud-docs#7432 ·
Maintainers usually reply within 1 day