Skip to content

MergeAsync sends resolution elements without the derived properties the Data schema requires #429

Open

Description

@samatstariongroup

Problem

PsmApiClient.MergeAsync (SySML2.NET.REST/AutoGenPsmApiClient/DiffMergeApi.cs) serializes the resolution elements with includeDerivedProperties: false (SySML2.NET.REST/PsmApiClient.cs, CreateContentAsync(IEnumerable<IData>, …)).

In Resources/ptc-25-02-30.json the merge request body is an array of Data, not DataRequest. Data resolves to the full element schemas (for example Package), which list the derived properties as required: owner, qualifiedName, ownedElement, membership, and so on. A merge with resolutions therefore sends a body that breaks the OpenAPI document.

Commit payloads are not affected: DataVersionRequest.payload is a DataRequest, where derived properties are optional.

Observed

Found by the Flexo integration scenario (#407, step 8, VerifyMerge). The OpenAPI conformance check reports:

POST /projects/{projectId}/branches/{targetBranchId}/merge: SchemaMismatch: /* required: Required properties ["documentation","filterCondition","importedMembership","isLibraryElement","member","membership","name","ownedAnnotation","ownedElement","ownedImport","ownedMember","ownedMembership","owner","owningMembership","owningNamespace","qualifiedName","shortName","textualRepresentation"] are not present

Expected

The merge body is serialized with the derived properties, so that each item conforms to Data.

The check in step 8 stays red until this is fixed.

Activity

  1. antoineatsoprasteria commented on Nov 12, 2026

    @antoineatsoprasteria
    Collaborator

    I don't agree that we have to do anything here. The OpenAPI json schema diverges from the specification. All derived properties seams required in the JSON Schema, with is not inline with what the specification says.

    Forcing an include of all derived properties would provide over-computation on any client.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions