Subject: [Asdf] enum abuse in OneDM playground

From: Carsten Bormann <[email-masked]>
Date: Tue, 30 Mar 2021 15:09:28 +0200

The sdf linter didn’t catch this yet:

(1) enum definitions without the redundant “type”: “string”:

** sdfobject-genericdefaulttransitiontime.sdf.json: type nil in {"enum"=>["100 Milliseconds", "1 Second", "10 Seconds", "10 Minutes"]}
** sdfobject-genericlevel.sdf.json: type nil in {"enum"=>["100 Milliseconds", "1 Second", "10 Seconds", "10 Minutes"]}
** sdfobject-genericonoff.sdf.json: type nil in {"enum"=>["Off", "On"]}
** sdfobject-genericonoff.sdf.json: type nil in {"enum"=>["100 Milliseconds", "1 Second", "10 Seconds", "10 Minutes”]}

(2) enum definitions with (correct) string values but the conflicting “type”: “number”:

** sdfobject-level.sdf.json: type "number" in {"enum"=>["Up", "Down"]}
** sdfobject-level.sdf.json: type "number" in {"enum"=>["MinimumDeviceValuePermitted", "SetToPreviousValue"]}
** sdfobject-onoff.sdf.json: type "number" in {"enum"=>["SetOnOffTo0", "SetOnOffTo1", "TogglePreviousOnOff", "SetPreviousOnOff"]}

Wondering whether this is a bug in the models or something that we should address (allow?) in the 1.next spec.

Grüße, Carsten

---

From: Michael Koster <[email-masked]>
Date: Tue, 30 Mar 2021 11:44:29 -0700

There ia a PR that isn't yet merged:
https://github.com/one-data-model/playground/pull/48 <https://github.com/one-data-model/playground/pull/48>

Updates all of these models to SDF 1.1 syntax.

Best regards,

Michael

> On Mar 30, 2021, at 6:09 AM, Carsten Bormann <[email-masked]> wrote:
> 
> -- 
> ASDF mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/asdf

---

From: Carsten Bormann <[email-masked]>
Date: Tue, 30 Mar 2021 22:19:12 +0200

Indeed!

It seems to me that this was stuck on the scaleM..imum issue, which is now resolved in SDF 1.1.
So maybe we can move this forward with a few changes; I put in a quick review.

Grüße, Carsten

> On 30. Mar 2021, at 20:44, Michael Koster <[email-masked]> wrote:
> 
> https://github.com/one-data-model/playground/pull/48
>