users@jersey.java.net

[Jersey] Re: how to view schema for a resource

From: Miroslav Fuksa <miroslav.fuksa_at_oracle.com>
Date: Wed, 21 Aug 2013 11:38:08 +0200

Hi,

Do you speak about Jersey 1.x or Jersey 2?

Jersey 2.x contains support for attaching XML schema of JAXB Beans. See
extended wadl support at
https://jersey.java.net/documentation/latest/wadl.html#d0e9126.
There is no support to attach JSON schema to WADL yet in Jersey 2.x.

Jersey 1.x contains both, XSD schemas and JSON schema:
  - https://wikis.oracle.com/display/Jersey/WADL for attaching xsd schemas
  - module om.sun.jersey.contribs:jersey-wadl-json-schema from Jersey
1.x to add JSON schema to WADL

Mira


On 08/21/2013 07:59 AM, Daniel Kirkdorffer wrote:
> Message
> Does the WADL not include a resource reference to the WADL path plus
> XSD that includes the schema for FOO?
> Dan
>
> -----Original Message-----
> *From:* rouble_at_gmail.com [mailto:rouble_at_gmail.com] *On Behalf Of
> *rouble
> *Sent:* Tuesday, August 20, 2013 3:17 PM
> *To:* users_at_jersey.java.net
> *Subject:* [Jersey] how to view schema for a resource
>
> I have a very trivial jersey REST web service as follows:
>
> @Path("/foows")
> public class FooWebServiceImpl {
> @GET
> @Path("/foo")
> @Produces(MediaType.APPLICATION_JSON)
> public FOO getFoo() throws FooException {
> return new FOO(4);
> }
> }
>
> I can view the WADL here:
> https://example.com/FooWebService/rest/application.wadl
> And, I can access the value of foo here:
> https://example.com/FooWebService/rest/foows/foo
>
> My question is how do I view the schema for FOO?
>
> tia,
> rouble
>