DYN-9663 fix missing parameter DataType in NodeDocumentationMarkdownGenerator#17141
Conversation
There was a problem hiding this comment.
See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-9663
4dd58cd to
e706161
Compare
RobertGlobant20
left a comment
There was a problem hiding this comment.
LGTM with minor comments
| /// <summary> | ||
| /// Collection of the nodes input port types. | ||
| /// </summary> | ||
| public IEnumerable<string> InputTypes { get; private set; } |
There was a problem hiding this comment.
does it need to be added to the publid API?
jasonstratton
left a comment
There was a problem hiding this comment.
Require adding methods to PublicAPI.Unshipped.txt
Adding a test for GetInputPoertType() default values is just suggested.
| /// <summary> | ||
| /// Collection of the nodes input port types. | ||
| /// </summary> | ||
| public IEnumerable<string> InputTypes { get; private set; } |
There was a problem hiding this comment.
Yes. I think so. both InputTypes.get and OutputTypes.get are new public API
| } | ||
|
|
||
| // Fallback: infer from the port's default value node type. | ||
| return DefaultValue switch |
There was a problem hiding this comment.
There are tests for GetInputPortType(). Please confirm that they cover the defaults for those cases when the NodeModel omits the InPortType
…enerator BuildParameters in AssemblyHandler.cs extracted only the parameter name from each VarDeclNode, ignoring arg.ArgumentType. Pass the ProtoCore.Type to TypedParameter so TypeName and TypeRank are populated in the generated node help data. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Output table had 3 column headers (Name, Description, DataType) but only emitted 2 <td> cells per row, leaving the DataType column always empty. Add the missing DataType cell using GetTypeFromDescription, consistent with the input port table rendering. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
GetTypeFromDescription parsed type from a multi-line tooltip string, which only worked when a parameter had a non-empty XML doc Summary. Nodes without Summary (common) or NodeModel nodes always showed empty type columns. Add InputTypes/OutputTypes to OpenNodeAnnotationEventArgs, populated via PortModel.GetInputPortType() and GetOutPortType() which correctly handle ZeroTouch, DesignScript, custom node, and NodeModel ([InPortTypes] attr) paths. Remove the now-unused GetTypeFromDescription helper. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…tribute NodeModel nodes without [InPortTypes] always returned null from GetInputPortType(), leaving the DataType column empty in the doc browser. As a fallback after the attribute check, infer the type string from the port's DefaultValue AST node: IntNode->int, DoubleNode->double, BooleanNode->bool, StringNode->string. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Add the new OpenNodeAnnotationEventArgs input and output type properties to the WPF public API list. Cover the NodeModel input-port type fallback path for ports that omit InPortTypes but provide default value AST nodes.
b3fcfa9 to
1afece9
Compare
jasonstratton
left a comment
There was a problem hiding this comment.
Beat me to making the PublicAPI change. Thank you. ... Approved & will merge
|





Purpose
Fixes missing DataType in the node documentation browser for input and output ports. Tracked in DYN-9663.
Three root causes addressed:
NodeDocumentationMarkdownGeneratordropped parameter types —BuildParametersinAssemblyHandler.csconstructedTypedParameterobjects with only the name, ignoringarg.ArgumentType. One-line fix to pass theProtoCore.Typethrough.Doc browser parsed type from a fragile multi-line string —
GetTypeFromDescriptiontried to extract type from a tooltip description string, which only worked when a parameter had a non-empty XML doc Summary. AddedInputTypes/OutputTypescollections toOpenNodeAnnotationEventArgs, populated directly fromPortModel.GetInputPortType()/GetOutPortType(), which already handle ZeroTouch, DesignScript, custom node, and[InPortTypes]/[OutPortTypes]attribute paths correctly.Output DataType cell was never emitted — Output table had 3 column headers (Name, Description, DataType) but only 2
<td>cells per row. Added the missing cell.NodeModel nodes without
[InPortTypes]always returned null — Added a fallback inGetInputPortType()to infer the type string from the port'sDefaultValueAST node (IntNode→int,DoubleNode→double,BooleanNode→bool,StringNode→string). NodeModel nodes without typed defaults or[InPortTypes]attributes will still show empty — those require separate annotation work.Declarations
Check these if you believe they are true
Release Notes
Fix missing DataType column in the node documentation browser. Input and output port types now display correctly for ZeroTouch, DesignScript, and NodeModel nodes. NodeModel nodes with typed default values (e.g.
Range,Sequence) will show inferred types even without explicit[InPortTypes]attributes.Reviewers
(FILL ME IN)
FYIs
(FILL ME IN, Optional)