spring-hateoas

Generate HAL-based hypermedia responses with links and affordances in Spring applications.

Updated Apr 9, 2026
One-click install
npx skills add https://github.com/ririnto/sinon --skill spring-hateoas
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: spring-hateoas
Source: https://github.com/ririnto/sinon/tree/main/plugins/spring/skills/spring-hateoas
Command: npx skills add https://github.com/ririnto/sinon --skill spring-hateoas

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Spring applications often struggle to deliver consistent, navigable, and self-describing REST responses. This skill provides a structured approach to building hypermedia representations using Spring HATEOAS, enabling links, assemblers, HAL output, affordances, and paged models to be produced reliably.

Core Features & Use Cases

  • Build and expose hypermedia-enabled REST endpoints using HAL or other compatible media types.
  • Use RepresentationModelAssembler to centralize link rules and ensure consistency across items, collections, and pages.
  • Support affordances and, where appropriate, HAL-FORMS templates for interactive clients and dynamic UIs.
  • Typical use cases include API endpoints that return item and collection models with stable links, paged navigation, and embedded resources.

Quick Start

Configure a minimal Spring Boot app and expose a RepresentationModel with a self link for an example resource.

Frequently Asked Questions about spring-hateoas

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add hypermedia links to Spring REST API responses?

Add hypermedia links to Spring REST API responses by including the spring-boot-starter-hateoas dependency and using RepresentationModel to generate HAL-based representations with navigable links and affordances.

What is the best way to maintain consistent links across Spring HATEOAS collection and paged endpoints?

Maintain consistent links across Spring HATEOAS collection and paged endpoints by using RepresentationModelAssembler to centralize link rules, ensuring stable relations across all controllers for items, collections, and pages.

Can I use HAL-FORMS templates with Spring HATEOAS for dynamic client affordances?

Spring HATEOAS supports affordances and HAL-FORMS templates for interactive clients and dynamic UIs, allowing you to expose actionable transitions within your hypermedia-enabled REST endpoints.

How do I structure a single hypermedia model for a Spring REST endpoint?

Structure a single hypermedia model for a Spring REST endpoint by extending RepresentationModel, applying a dedicated RepresentationModelAssembler, and ensuring the endpoint returns one consistent HAL representation per resource.

Do I need spring-boot-starter-hateoas to generate HAL representations in Spring?

You need the spring-boot-starter-hateoas dependency to generate HAL representations in Spring, as it provides the required RepresentationModel and assembler components to build self-describing hypermedia responses.