The Endpoints Java Framework aims to be a simple solution to assist in creation
of RESTful web APIs in Java. This repository provides several artifacts, all
in the com.aodocs.endpoints
group:
endpoints-framework
: The core framework, required for all applications building Endpoints apps.endpoints-framework-all
: Same as above, but with repackaged dependencies.endpoints-framework-guice
: An extension for configuring Endpoints using Guice.endpoints-framework-tools
: Tools for generating discovery documents, Swagger documents, and client libraries.
The main documents for consuming Endpoints can be found at https://cloud.google.com/endpoints/docs/frameworks/java
To install test versions to Maven for easier dependency management, simply run:
gradle install
These are the most notable additions to the original project by Google, currently inactive:
- Runtime
- Allow adding arbitrary data to generic errors
- Improve returned errors on malformed JSON
- Validate request parameters/body through Java bean validation provided by Hibernate validator
- Validate request content-type (must be enable through enableContentTypeValidation servlet parameter)
- Discovery and Swagger
- Add description on resources and resource usage as request body
- Support declaring resource properties as required
- Support pattern, minimum/maximum attributes
- Swagger
- Generated spec is fully compatible with Cloud Endpoints Portal (and is 100% valid Swagger spec)
- Support multi-API service in Endpoints Management
- New options to combine common parameters in same path, extract parameter refs at spec level, add error model description, customize spec title and description
- Add description support for resource and resource usage
- Configurable naming templates for operationIds and tag names with better defaults
- Support exclusiveMinimum/exclusiveMaximum, minLength/maxLength and minItems/maxItems attributes
Check closed PRs for all additions.
- When using validation with java bean validation annotations : in order to have well named parameters instead of arg0/arg1 in error messages, your code must be compiled with the
-parameters
options.
Your contributions are welcome. Please follow the contributor guidelines.