An open API service indexing awesome lists of open source software.

https://github.com/ingogriebsch/sample-spring-hateoas-hal-forms

This sample shows you how to enhance a REST API with Spring HATEOAS providing the HAL-FORMS media type
https://github.com/ingogriebsch/sample-spring-hateoas-hal-forms

example hal hal-forms hateoas hypermedia java sample spring spring-boot spring-hateoas

Last synced: about 2 months ago
JSON representation

This sample shows you how to enhance a REST API with Spring HATEOAS providing the HAL-FORMS media type

Awesome Lists containing this project

README

          

# Spring HATEOAS HAL-FORMS sample
[![TravisCI Status](https://travis-ci.org/ingogriebsch/sample-spring-hateoas-hal-forms.svg?branch=master)](https://travis-ci.org/ingogriebsch/sample-spring-hateoas-hal-forms)
[![CircleCI Status](https://circleci.com/gh/ingogriebsch/sample-spring-hateoas-hal-forms.svg?style=svg)](https://circleci.com/gh/ingogriebsch/sample-spring-hateoas-hal-forms)
[![Codecov Status](https://codecov.io/gh/ingogriebsch/sample-spring-hateoas-hal-forms/branch/master/graph/badge.svg)](https://codecov.io/gh/ingogriebsch/sample-spring-hateoas-hal-forms)
[![Codacy Status](https://api.codacy.com/project/badge/Grade/0635e5b133064fa19c78adda4de13cee)](https://app.codacy.com/app/ingo.griebsch/sample-spring-hateoas-hal-forms?utm_source=github.com&utm_medium=referral&utm_content=ingogriebsch/sample-spring-hateoas-hal-forms&utm_campaign=Badge_Grade_Dashboard)
[![DepShield Status](https://depshield.sonatype.org/badges/ingogriebsch/sample-spring-hateoas-hal-forms/depshield.svg)](https://depshield.github.io)
[![License](http://img.shields.io/:license-apache-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)

This sample shows you how to enhance a REST API with Spring HATEOAS providing the HAL-FORMS media type.

If you start the Spring Boot application you can access

* this page through [http://localhost:8080](http://localhost:8080/).
* the root of the API through [http://localhost:8080/api](http://localhost:8080/api).
* a HAL based browser through [http://localhost:8080/browser/browser.html#/api](http://localhost:8080/browser/browser.html#/api).

## Additiomal resources
You should have a look at the following resources if you are interested in the topic and would like to get a better understanding about the pros and cons of using/doing HATEOAS.

* [HAL-FORMS](https://rwcbook.github.io/hal-forms/)
* [REST with Hypermedia - Hot or Not?](https://reflectoring.io/rest-hypermedia/)

## Used frameworks
Collection of the mainly used frameworks in this project. There are more, but they are not that present inside the main use case therefore they are not listed here.

* [Spring HATEOAS](https://docs.spring.io/spring-hateoas/docs/1.0.0.RC2/reference/html/)
* [Spring Web](https://docs.spring.io/spring/docs/5.2.0.RC2/spring-framework-reference/web.html#spring-web)
* [Spring Boot](https://docs.spring.io/spring-boot/docs/2.2.0.M6/reference/htmlsingle/)

## License
This code is open source software licensed under the [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0.html).