Skip to content

GhJSON validation error requires correct Id or fallback logic #396

@marc-romu

Description

@marc-romu

Description

Issue identified by @nofcfy-fanqi in #389 :

GhJSON validation error occurs when creating or editing scripts. If neither Id nor InstanceGuid are provided to GhJSON.Core, it produces an error: "Component must have either 'id' or 'instanceGuid'". The ID assignment logic is still new and might require additional testing; in future releases, either a correct Id will be provided or GhJSON.Core will be modified to automatically set it.

Operating System

macOS

Rhino Version

RH8.28

SmartHopper Version

1.4.0-alpha

Steps to Reproduce

  1. Generate or edit a script using SmartHopper
  2. GhJSONComponent is created with InstanceGuid = null and Id is not set
  3. Attempt to validate or save the GhJSON
  4. Observe debug error indicating missing Id or InstanceGuid.

Expected Behavior

Script Generation should provide the correct ID, or GhJSON.Core should automatically assign a valid Id if none is provided.

Additional Material

No response

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions