Skip to content

DYN-10119: Add IValueSchemaProvider and typeIds to DefineData#17040

Merged
kalunkuo merged 10 commits into
DynamoDS:masterfrom
kalunkuo:DYN-10119
May 8, 2026
Merged

DYN-10119: Add IValueSchemaProvider and typeIds to DefineData#17040
kalunkuo merged 10 commits into
DynamoDS:masterfrom
kalunkuo:DYN-10119

Conversation

@kalunkuo

@kalunkuo kalunkuo commented Apr 10, 2026

Copy link
Copy Markdown
Contributor

Purpose

Expose wire-format $typeid values from DataNodeDynamoType through a new public IValueSchemaProvider interface, so DynamoPlayer and DynamoMCP can programmatically resolve the canonical type identifier for DefineData nodes.

Previously, external consumers (DynamoPlayer, MCP) had no programmatic way to get the $typeid that ProtoGeometry's ToJson() emits for a given DefineData type. They relied on display names (e.g. "Point") and maintained separate hardcoded lookup dictionaries, which drifted from actual wire values.

Related PRs: DynamoPlayer (reads ValueTypeId via reflection) and DynamoMCP (resolves typeIds to JSON Schemas for LLM consumers).

Key changes:

  • New IValueSchemaProvider interface in DynamoCore/Graph/Nodes/ with ValueTypeId (string) and IsListValue (bool)
  • DefineData implements IValueSchemaProvider, returning DataNodeDynamoType.TypeId via ValueTypeId
  • DataNodeDynamoType gains a TypeId property populated with the actual wire-format $typeid for each supported type (e.g. "autodesk.math:point3d-1.0.0" for Point, "autodesk.geometry.curve:circle-1.0.0" for Arc/Circle)
  • Wire-format typeIds verified against actual StringifyJSON output — see Sample.json attached to the Jira ticket
  • PublicAPI.Unshipped.txt updated with the 3 new public API members

Declarations

Check these if you believe they are true

Release Notes

Expose wire-format $typeid values from DataNodeDynamoType through a new public IValueSchemaProvider interface

Reviewers

(FILL ME IN) Reviewer 1 (If possible, assign the Reviewer for the PR)

(FILL ME IN, optional) Any additional notes to reviewers or testers.

FYIs

(FILL ME IN, Optional) Names of anyone else you wish to be notified of

Copilot AI review requested due to automatic review settings April 10, 2026 14:15

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-10119

@kalunkuo kalunkuo changed the title DYN-10119: Expose typeid with IValueSchemaProvider interface DYN-10119: Add IValueSchemaProvider and wire-format typeIds to DefineData Apr 10, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new public API surface to expose a stable, wire-format type identifier ($typeid) for DefineData nodes so external consumers (e.g., DynamoPlayer, DynamoMCP) can resolve canonical type identifiers without relying on display names.

Changes:

  • Introduces Dynamo.Graph.Nodes.IValueSchemaProvider with ValueTypeId and IsListValue.
  • Extends DSCore.Data.DataNodeDynamoType with a TypeId field populated for supported types and wires those IDs into the supported type list.
  • Implements IValueSchemaProvider on CoreNodeModels.DefineData and updates DynamoCore/PublicAPI.Unshipped.txt.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
src/Libraries/CoreNodes/Data.cs Adds TypeId to supported data types and populates wire-format $typeid strings.
src/Libraries/CoreNodeModels/DefineData.cs Implements IValueSchemaProvider to expose typeId/list context from the dropdown selection.
src/DynamoCore/Graph/Nodes/IValueSchemaProvider.cs Adds the new public interface for external consumers to query schema/type info.
src/DynamoCore/PublicAPI.Unshipped.txt Registers the new public interface members for API analyzer compliance.

Comment thread src/Libraries/CoreNodeModels/DefineData.cs Outdated
Comment thread src/Libraries/CoreNodeModels/DefineData.cs
Comment thread src/Libraries/CoreNodes/Data.cs Outdated
Comment thread src/Libraries/CoreNodes/Data.cs
@kalunkuo kalunkuo changed the title DYN-10119: Add IValueSchemaProvider and wire-format typeIds to DefineData DYN-10119: Add IValueSchemaProvider and typeIds to DefineData Apr 10, 2026

@RobertGlobant20 RobertGlobant20 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some minor comments LGTM,

Comment thread test/DynamoCoreTests/Nodes/DefineDataTests.cs Outdated
Comment thread src/Libraries/CoreNodeModels/DefineData.cs

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Comment thread src/DynamoCore/Graph/Nodes/IValueSchemaProvider.cs Outdated
[Category("UnitTests")]
public void ValueTypeIdSafeWhenNoSelection()
{
var node = new DefineData();
johnpierson and others added 3 commits April 30, 2026 09:28
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
</summary>
</member>
<member name="M:DSCore.Data.DataNodeDynamoType.#ctor(System.Type,System.String)">
<member name="M:DSCore.Data.DataNodeDynamoType.#ctor(System.Type,System.String,System.String)">

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's been a while since I have looked at the localization pipeline - @kalunkuo @RobertGlobant20 @QilongTang - just curious - do updates to the xmls here drive the localization prs?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as far as I remember the files like DSCoreNodes.xml file are generated when CoreNodes documentation in cs files is updated (and after the csproj file is build) and the xml is generated in the Dynamo output directory, so there is a process that copy the xml file from output to doc/distrib/xml/en-US/ so you will see it as change in github, then after the dev submits the PR and is merged to master the localization process detects a change in doc/distrib/xml/ and generate a PR with all the other xml files in doc/distrib/xml/ for each language, finally when dynamo installer/release is created we are using the localized xml files for showing the info in the Dynamo language selected

Comment thread src/DynamoCore/Graph/Nodes/IValueSchemaProvider.cs Outdated
Comment thread src/Libraries/CoreNodes/Data.cs Outdated
polygon,
rectangle,
new(typeof(System.DateTime)),
new(typeof(double), "Number"),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm @saintentropy - what am I missing here WRT to the forgedata primitive types you mentioned?

public class DefineData : DSDropDownBase, IValueSchemaProvider
{
/// <inheritdoc/>
[JsonIgnore]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a use case for serializing these values?

@mjkkirschner

Copy link
Copy Markdown
Member

@kalunkuo is there a reason this has not been merged yet? Was it waiting on anything else? It looks ok to me, with a few questions.

@mjkkirschner

Copy link
Copy Markdown
Member

started a new build job here https://c007.cloudbees-ci.autodesk.com/job/DYNCI/job/Dynamo/job/DynamoSelfServe/job/pullRequestValidation/184/

@kalunkuo

kalunkuo commented May 7, 2026

Copy link
Copy Markdown
Contributor Author

@kalunkuo is there a reason this has not been merged yet? Was it waiting on anything else? It looks ok to me, with a few questions.

No particular reason — it was submitted while everyone was on vacation.

@sonarqubecloud

sonarqubecloud Bot commented May 7, 2026

Copy link
Copy Markdown

@kalunkuo kalunkuo merged commit 4d5fbf3 into DynamoDS:master May 8, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants