On Thu, 2014-03-20 at 19:34 +1100, Christopher Yeoh wrote: > On Tue, 18 Mar 2014 19:52:27 +0100 > "Koderer, Marc" <[email protected]> wrote: > > > > Am I missing something or are these schemas being added now just a > > > subset of what is being used for negative testing? Why can't we > > > either add the extra negative test info around the new test > > > validation patches and get the double benefit. Or have the negative > > > test schemas just extend these new schemas being added? > > > > Yes, the api_schema files should theoretically be a > > subsets of the negative test schemas. > > But I don't think that extending them will be possible: > > > > if you have a property definition like this: > > > > "properties": { > > "minRam": { "type": "integer",} > > > > how can you extend it to: > > > > "properties": { > > "minRam": { > > "type": "integer", > > "results": { > > "gen_none": 400, > > "gen_string": 400 > > } > > > > This is the reason why I am unsure how inheritance can solve > > something here. > > I think this is an example of how we can do some sharing of schema > definitions when there is sufficient commonality to justify it.
JSON-Schema, for the record, actually does support extending the definition of the schema using the additionalProperties attribute on a schema object. Best, -jay _______________________________________________ OpenStack-dev mailing list [email protected] http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
