Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

model.query() does not return unnamed connectors/allocations/flows, satisfy usages, or metadata usages

Closed
#643 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
go, python
Domain
api, backend

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, connection or flow usage is returned by model.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 as SatisfyRequirementUsage via model.query(), and neither is a MetadataUsage, named or not.
  • A named perform action x : A usage is returned with type ActionUsage.
  • 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Open-MBEE/OpenSysML

All issues in Open-MBEE/OpenSysML

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.