Category Archives: RESTful Services

REST handling empty POST body and filters concepts

http://stackoverflow.com/questions/20585348/post-empty-body-with-jersey-2-client   http://stackoverflow.com/questions/13326142/how-to-handle-empty-null-request-payload-in-jersey-rest   https://jersey.java.net/documentation/latest/filters-and-interceptors.html   http://www.mkyong.com/tutorials/jax-rs-tutorials/   http://www.mkyong.com/webservices/jax-rs/json-example-with-jersey-jackson/

Best practices for restful services versioning and documentation

http://stackoverflow.com/questions/389169/best-practices-for-api-versioning?rq=1 http://stackoverflow.com/questions/28853483/rest-api-versioning-with-swagger-2-0 http://stackoverflow.com/questions/35783349/setting-the-api-version-with-swagger-ui https://github.com/swagger-api/swagger-core/wiki/Swagger-Core-Jersey-2.X-Project-Setup-1.5 https://github.com/swagger-api/swagger-core/wiki/Annotations-1.5.X#swaggerdefinition Swagger Specification  Swagger Specification http://tech.asimio.net/2016/05/07/Documenting-multiple-REST-API-versions-using-Spring-Boot-Jersey-and-Swagger.html   Handling versioning with dispatchers http://maxenglander.com/2013/05/28/separate-resource-versions-with-context-resolvers-in-jersey.html

RESTful services automated testing

WebApplication automated testing http://wiremock.org/ http://stackoverflow.com/questions/31025753/jbehave-for-testing-rest-web-application You could use WireMock. It’s a library that works really good with http requests. You could start your WireMock server in @BeforeStory and it will start recording and then shut it down in your @AfterStory in your steps class. You will have your response for your request stored in a… Read More »

RESTful services references

Bean validation https://jersey.java.net/documentation/latest/bean-validation.html http://www.makeinjava.com/validation-request-query-parameters-standard-annotations-jersey-bean-validation/ http://www.makeinjava.com/validation-of-rest-parameters-using-jersey-framework-part-2/ Blogs https://jersey.java.net/bloggers.html Quick guide https://www.tutorialspoint.com/restful/restful_quick_guide.htm Status codes: Sr. No. HTTP Code Description 1 200 OK, shows success. 2 201 CREATED, when a resource is successful created using POST or PUT request. Return link to newly created resource using location header. 3 204 NO CONTENT, when response body is empty for example, a… Read More »