[rest-practices] Namespace qualifying respresentation types

Bryan Kearney bkearney at redhat.com
Fri Apr 30 14:34:13 UTC 2010


On 04/29/2010 06:55 AM, Eoghan Glynn wrote:
>
> Folks,
>
> I wanted to get the group's feeling for the use of namespaces in
> representation types.
>
> The context for the question initially comes from a discussion about how
> action/operations were to be modelled in RHEVM-API, particularly how to
> capture the action-specific parameter types in the schema. In XML schema
> terms, my first cut was to use an xs:any within the action element, but
> to restrict the contained type to the local namespace. Which of course
> requires that a target namespace is defined in the first place.
>
> So I'm sensing there may be some opposition to this, given that
> namespacing isn't widely used in the existing RESTful APIs. I guess I'm
> wondering whether this ommission was a concious decision, or just that
> nobody saw the need for using namespaces but wouldn't be averse to their
> use in principle.
>
> Obviously there are other RESTful examples out there in the wild where
> the xmlns attribute makes an appearance, Atom springs to mind here ...
> <feed xmlns="http://www.w3.org/2005/Atom">. And I don't need to rehearse
> the basic advantages of using namespaces, partitioning the global
> namespace, aiding in validation, encoding version information etc. But I
> would be interested in hearing if there's determined opposition to their
> use, and if so what the reasoning is.
>
> Thanks,
> Eoghan
>
>
>
> _______________________________________________
> rest-practices mailing list
> rest-practices at redhat.com
> https://www.redhat.com/mailman/listinfo/rest-practices

I would be all for namespaces for links and actions As long as it does 
not make the json marshalling wonky.  I saw some example where the json for

<foo bar="12">

was

foo: {@bar="12}

which is wonky.


-- bk




More information about the rest-practices mailing list