On Thu, Aug 31, 2017 at 11:29 AM, Michael Richardson <[email protected]> wrote: > After adoption, I think the WG should consider if describing the JSON in YANG > would make sense. I've been through this in netconf/anima/6tisch now, and > while it seems like a silly annoyance at first, it seems to have some > advantages in the long run.
Hi Michael, I've been YANG-averse for too long. I just looked and it seems like a pretty sensible design overall. Much more readable than the JSON content rules. Do you know if the outer object can be stripped off? Context is usually sufficient to avoid that extra layer (and HTTP provides content-type to provide that context). Reading https://datatracker.ietf.org/doc/html/rfc7951#section-4 it appears as though the obvious schema for capport [1] would end up with instance documents looking like this: { "capport:capport" { "captive": false, "end": "2017-01-01T12:22Z" } } That extra wrapping is a little annoying. Not fatal, of course. [1] module capport { yang-version 1.1; namespace "urn:...:ietf:...:capport"; prefix "capport"; import ietf-yang-types { prefix yang; } // ... metadata stuff container top { leaf captive { type boolean; } leaf end { type yang:date-and-time; } } } _______________________________________________ Captive-portals mailing list [email protected] https://www.ietf.org/mailman/listinfo/captive-portals
