On Dec 18, 2009, at 3:21 PM, James Strachan wrote:
> Letting the server specify it is always going to return html before
> xml sounds like a good thing; I agree the qs thing is maybe a bit
> hacky as a client could use weird numbers etc.
>
OK. Also, it is not clear to me how it will work appropriately with qs
attributes on media types declared in @Produces on resources methods.
It could get messy.
I am thinking if one wants full blown Apache-style conneg for files
then it might be better to implement this as something separate.
> The only other thought I have right now is, I generally dislike
> annotations with arrays in them; as you can't use constants (probably
> due to arrays not being immutable). The various produces/consumes
> annotations can often end up being not very DRY as you have to cut n
> paste the usual suspects of MIME types all over the place. So I'd like
> to be able to use a single String parameter for @Produces, @Consumes,
> @ImplicitProduces,
Good point. We fixed that for JAX-RS 1.1, you logged the issue :-)
https://jsr311.dev.java.net/nonav/releases/1.1/javax/ws/rs/Produces.html
#value%28%29
@ImplicitProduces has the same semantics.
> @ProducesOrder - so folks can use a couple of
> constant String values across all their code (as there's likely to be
> only a fairly small set of values of these things in any app).
>
OK, are your fine with the proposed syntax?
Paul.