Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default value for date-time format in referenced WoT ThingModel is generated as empty string #1951

Closed
thjaeckle opened this issue Jun 3, 2024 · 0 comments · Fixed by #2026
Assignees
Labels
Milestone

Comments

@thjaeckle
Copy link
Member

thjaeckle commented Jun 3, 2024

Currently, when Ditto generates the JSON Skeleton for a Thing when a WoT "ThingModel" is referenced in the "definition" field on creation, non-optional properties with:

{
  "type": "string",
  "format": "date-time"
}

Are generated as:

"propertyName": ""

-> which is the "neutral element" for Strings.

We should however generate the "neutral element" for dates, which IMO would be EPOCH:

"propertyName": "1970-01-01T00:00:00Z"
@thjaeckle thjaeckle added the bug label Jun 3, 2024
thjaeckle added a commit to beyonnex-io/ditto that referenced this issue Sep 20, 2024
@thjaeckle thjaeckle added this to the 3.6.0 milestone Sep 20, 2024
@thjaeckle thjaeckle self-assigned this Sep 20, 2024
@thjaeckle thjaeckle moved this to Waiting for Approval in Ditto Planning Sep 20, 2024
thjaeckle added a commit that referenced this issue Sep 27, 2024
…al-element

#1951 generate EPOCH timestamp as neutral element for string "format" date-time, date, time
@github-project-automation github-project-automation bot moved this from Waiting for Approval to Done in Ditto Planning Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
1 participant