Code review comment for lp://qastaging/~justin-fathomdb/nova/output-xml-in-order

Revision history for this message
Brian Waldon (bcwaldon) wrote :

> On pre-reqs, I know that I push DVCS a bit too hard, and don't use it
> correctly in other places! I haven't figured out how to split out
> commits easily with bazaar yet - hopefully someone will give a master
> class at the Design Summit.

I could definitely use this, too.

> Though we're not schema compliant, I think shipping the schemas is
> just honest. The schemas are readily available on the rackspace
> website (1.0) and in our own documentation (1.1). Sadly, not shipping
> the schemas won't make our output correct. I think adding them
> piecemeal is just a bit of a waste of time when they're already
> available elsewhere.

What does adding the schemas to the project get us if they are already all available and easily accessible? The major reason to add the schemas is to validate input/output. Right now, adding the schemas isn't adding much value to the product.

> I am all for adding JSON schemas. In the meantime, if our JSON was
> strictly derived from our XML (as it probably should be), then
> validating our XML would validate our JSON, and everything would be
> much easier. Otherwise, checking that we have valid XML helps
> developers check their output.

JSON and XML are two *different* outputs. We will align them, but one shouldn't depend on the other. With your logic, we could use XML objects to represent things internally, then serialize it to JSON in a response.

> This is not enabled by default in
> production, nor even in the unit tests at the moment.
>
> This doesn't cause any unit tests to fail unless you tweak the flags
> to go into 'strict mode', BTW.

This brings me back to my point above, what real value are we getting if we don't strictly enforce the schemas?

« Back to merge proposal