[Container-tools] JSON Schema in Python Level 2

Vaclav Pavlin vpavlin at redhat.com
Tue Nov 3 16:13:40 UTC 2015


Hi all,

As you probably know, we are using JSON Schema in Nulecule to define the
specification. This let's us validate the Nulecule file against the spec,
but that's all right now.

There have been ideas to write a tool which will generate textual
representation from the schema and potentially a tool which could generate
template Nulecule file from the schema.

I always liked specs defined as structures in Go lang - they are easy to
read and use. After a discussion with Pavel yesterday, he got an idea which
got alive in his Github repository:

https://github.com/rh-scp/metadata/blob/python-schema-1/schema/python-impl.md

Basically a way how to define a specification through Python classes and
annotation (similarly to what can be done in Golang). I think Nulecule
would be a great fit for this "experiment". IOW, we should try to rework
the spec to the form Pavel is proposing to be able to a) generate the spec
from code, b) use that code in Atomic App directly c) generate the docs, d)
be able to generate Go lang structures from it in the future (and thus make
it easy for anybody to just build on top of the spec)

I'd like to propose it as a topic for this or next week Cabal and get
someone assigned after the release.

Comments can be added here:

https://github.com/rh-scp/metadata/pull/2


Cheers,
Vašek

-- 
Architect - Senior Software Engineer
Developer Experience
Brno, Czech Republic
Phone: +420 739 666 824
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/container-tools/attachments/20151103/2865f2cb/attachment.htm>


More information about the Container-tools mailing list