-
Notifications
You must be signed in to change notification settings - Fork 56
Home
reinert edited this page Mar 17, 2013
·
12 revisions
- Generate json-schemas from Java Types
- Generate hyper-schemas from JSR311 (Java RESTful spec) annotated classes
- Simple Types
- All Java simple types are mapped to generate simple json-schemas
- Custom Collection Types
- If you intend to create a custom collection, wrapping a normal Java Collection using Generics, than JJSchema can generate a custom array schema for you
- Enums
- JJSchema process Java Enums with great flexibility. It can identify if your Enum implementation is based on String, Integer or Number values. When using numeric values at a Enum, just override the toString() method returning String.valueOf( value ).
- Custom Types
- JJSchema correctly process your Java classes as custom object schemas, requiring from you to use one simple annotation (SchemaProperty)
- Also JJSchema supports the Nullable annotation, when you intend to allow null values for a schema.
- It supports Java inheritance, merging the parent's schema with the child's one.
- @GET, @POST, @PUT and @DELETE annotations
- @QueryParam, @FormParam are processed as parameters (other param annotations are passed by)
- Any Java Type as Parameter
- @Media annotation for declaring JSON Hyper-Schema media atributtes (mediaType and binaryEncoding)
- @Rel annotation for declaring the intended rel atrtibute (if not declared than the method name is assumed as the rel)
For better understanding how JSON Hyper-Schema works, please read the specification at http://json-schema.org/latest/json-schema-hypermedia.html.
FOR HOW TO USE IT, PLEASE [GIVE A LOOK AT THE TESTS] (https://github.com/reinert/JJSchema/tree/master/src/test/java/com/github/reinert/jjschema/test). THEY WERE WELL DESIGNED FOR UNDERSTANDING THE ACTUAL SUPPORTED FEATURES.