[Container-tools] JSON Schema in Python Level 2

Aaron Weitekamp aweiteka at redhat.com
Wed Nov 4 13:36:31 UTC 2015


On Wed, Nov 4, 2015 at 6:32 AM, Maciej Szulik <maszulik at redhat.com> wrote:

> Both OpenShift and K8S rely on swagger library for generating schemas
> from Go code. I know there's a python counterpart [1] but I haven't
> tried it, maybe it'll be helpful for you guys.
>
>
​+1. I would lean strongly towards current golang tools/patterns.

​

> Maciej
>
> [1] https://github.com/digium/swagger-py/
>
>
>
> On 11/03/2015 05:13 PM, Vaclav Pavlin wrote:
>
>> 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
>>
>>
>>
>> _______________________________________________
>> Container-tools mailing list
>> Container-tools at redhat.com
>> https://www.redhat.com/mailman/listinfo/container-tools
>>
>>
> _______________________________________________
> Container-tools mailing list
> Container-tools at redhat.com
> https://www.redhat.com/mailman/listinfo/container-tools
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/container-tools/attachments/20151104/3289f481/attachment.htm>


More information about the Container-tools mailing list