All Projects → gregwhitaker → catnap

gregwhitaker / catnap

Licence: Apache-2.0 license
Partial JSON response framework for RESTful web services

Programming Languages

java
68154 projects - #9 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to catnap

id-mask
IDMask is a Java library for masking internal ids (e.g. from your DB) when they need to be published to hide their actual value and to prevent forging. It has support optional randomisation has a wide support for various Java types including long, UUID and BigInteger. This library bases its security on strong cryptographic primitives.
Stars: ✭ 39 (-29.09%)
Mutual labels:  jax-rs, jackson
Typescript Generator
Generates TypeScript from Java - JSON declarations, REST service client
Stars: ✭ 729 (+1225.45%)
Mutual labels:  jax-rs, jackson
Jackson Jaxrs Providers
Multi-module project that contains Jackson-based JAX-RS providers for JSON, XML, YAML, Smile, CBOR formats
Stars: ✭ 98 (+78.18%)
Mutual labels:  jax-rs, jackson
spring-rest-2-ts
spring rest 2 ts is typescript generator which produces data model and services in typescript based on Spring MVC annotations. It supports generation for Angular and React
Stars: ✭ 59 (+7.27%)
Mutual labels:  jax-rs, jackson
Jersey Jwt
Example of REST API with JWT authentication using Jersey, Jackson, Undertow, Weld, Hibernate and Arquillian.
Stars: ✭ 131 (+138.18%)
Mutual labels:  jax-rs, jackson
Feign
Feign makes writing java http clients easier
Stars: ✭ 7,681 (+13865.45%)
Mutual labels:  jax-rs
Netty Http
Netty based HTTP service with JAX-RS
Stars: ✭ 109 (+98.18%)
Mutual labels:  jax-rs
reactive-wizard
Reactive non-blocking web applications made really easy with JAX-RS and RxJava.
Stars: ✭ 25 (-54.55%)
Mutual labels:  jax-rs
migrate-Java-EE-app-to-azure
Migrate an existing Java EE workload to Azure
Stars: ✭ 12 (-78.18%)
Mutual labels:  jax-rs
Resteasy Spring Boot
RESTEasy Spring Boot Starter
Stars: ✭ 190 (+245.45%)
Mutual labels:  jax-rs
Pac4j
Security engine for Java (authentication, authorization, multi frameworks): OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
Stars: ✭ 2,097 (+3712.73%)
Mutual labels:  jax-rs
Jrestless
Run JAX-RS applications on AWS Lambda using Jersey. Supports Spring 4.x. The serverless framework can be used for deployment.
Stars: ✭ 93 (+69.09%)
Mutual labels:  jax-rs
Fhir
The IBM® FHIR® Server and related projects
Stars: ✭ 117 (+112.73%)
Mutual labels:  jax-rs
Jeddict
Jakarta EE 8 (Java EE) & MicroProfile 3.2 application generator and modeler
Stars: ✭ 358 (+550.91%)
Mutual labels:  jax-rs
Proteus
Lean, mean, and incredibly fast JVM framework for web and microservice development.
Stars: ✭ 178 (+223.64%)
Mutual labels:  jax-rs
membership
Membership service (to demonstrate graphQL)
Stars: ✭ 19 (-65.45%)
Mutual labels:  jax-rs
Summer
Vertx router with JAX-RS
Stars: ✭ 54 (-1.82%)
Mutual labels:  jax-rs
Hikaku
A library that tests if the implementation of a REST-API meets its specification.
Stars: ✭ 154 (+180%)
Mutual labels:  jax-rs
Dropwizard
A damn simple library for building production-ready RESTful web services.
Stars: ✭ 8,078 (+14587.27%)
Mutual labels:  jax-rs
Crnk Framework
JSON API library for Java
Stars: ✭ 234 (+325.45%)
Mutual labels:  jax-rs

catnap

Build Status

Catnap is a framework for supporting partial JSON and JSONP responses in RESTful web services by allowing users to supply arbitrary queries in the URL.

Catnap supports partial responses in the following web frameworks:

  • Spring Boot
  • SpringMVC
  • RESTEasy
  • Jersey

What is a partial response?

By default, the server will send back the full representation of a rest resource for every request. Partial responses let you request only the elements you are interested in, instead of the full resource representation. This allows your client application to avoid transferring, parsing, and storing unneeded fields, so you can utilize network and memory resources more efficiently.

For example, take the two responses below. Both are requests for the same resource, but let's assume we are only interested in the following fields:

  • Product Name
  • List Price
  • Image Url for Thumbnail Images

Full Resource Representation

https://www.catnap.it/products/12345/details

{
  "id": "12345",
  "name": "Product 1",
  "prices": {
    "list": "$120.00",
    "sale": "89.99"
  },
  "images": [
    {
      "sortOrder": 1,
      "url": "https://catnap-springboot-sample.herokuapp.com\/12345-primary.png",
      "alt": "Product 1",
      "size": "primary"
    },
    {
      "sortOrder": 2,
      "url": "https://catnap-springboot-sample.herokuapp.com\/12345-thumbnail.png",
      "alt": "Product 1",
      "size": "thumbnail"
    }
  ]
}

Partial Resource Representation

https://www.catnap.it/products/12345/details?fields=name,prices(list),images(url)[size=thumbnail]

{
  "name" : "Product 1",
  "prices" : {
    "list" : "$120.00"
  },
  "images" : [ {
    "url" : "https://catnap-springboot-sample.herokuapp.com/12345-thumbnail.png"
  } ]
}

As you can see, the partial response is a significant reduction in payload size and message complexity. By allowing the consumer of the API to specify the fields they are interested in you can significantly reduce the complexity of response messages as well as improve performance over the wire.

Getting Catnap

Catnap libraries are available from JCenter.

  • catnap-spring - Use this library if you are integrating Catnap with a SpringMVC application.
  • catnap-springboot - Use this library if you are integrating Catnap with a Spring Boot application.
  • catnap-jaxrs - Use this library if you are integrating Catnap with a Jersey or RESTEasy application.

Getting Started with Catnap

Please see the wiki for detailed documentation on how to get started using Catnap.

For documentation on the Catnap Query Language, please consult the Catnap Query Language Reference.

Examples

Please see the included example projects for demonstrations on how to configure and use Catnap with your favorite web framework.

Bugs and Feedback

For bugs, questions and discussions please use the Github Issues.

License

Copyright 2016-2019 Greg Whitaker

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].