Skip to content

Conversation

@TejInaco
Copy link
Contributor

@TejInaco TejInaco commented Oct 28, 2025

This PR improves version handling in the conversion from Thing Model to Thing Description.
The bug is described in issue #137.

Previously, when a user converted a Thing Model to a Thing Description that included a version key, the conversion succeeded without validating the instance property inside the version object. As a result, although the generation was successful, the validation process would later raise an error.

This update introduces the following improvements:
Detects whether the version key exists in the parsed Thing Model.
Validates the format of the version value (must be either an object with an instance property or a string).
Allows users to provide a custom instance value via an input field in the ToTD dialog.
Automatically generates a Unix timestamp as the instance value if the user input is empty.
Properly updates the generated Thing Description with the validated instance value.

Typecript checks were improvement.

@netlify
Copy link

netlify bot commented Oct 28, 2025

Deploy Preview for editdor ready!

Name Link
🔨 Latest commit b002c2f
🔍 Latest deploy log https://app.netlify.com/projects/editdor/deploys/69033caef3b59800087348ef
😎 Deploy Preview https://deploy-preview-162--editdor.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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.

1 participant