restjerseycontract-first

Contract First Approach with Jersey


I am currently working on a projects API layer with an existing REST services using JERSEY. Most of the initial services are created in a contract last approach utilizing jaxb annotations etc.. Lately, i was asked to do a contract first approach instead due to versioning concerns easier 3rd party integration by providing the schema to other clients.

can anyone provide a useful resource or a reading material for a contract first approach with REST as most of the stuff i find related to contract first approach points me to SOAP examples.

Thanks


Solution

  • Nothing wrong with using XSD to define your XML responses, however, you really need to consider you URI namespace for the problem domain. RESTful Web Services (O'Reilly 2007, Richardson & Ruby) has a couple of good chapters on this (chapters 4-6). There's a lot of other good stuff in this book.