spring-projects / spring-projects/spring-hateoas

Allow extending HAL-Forms media type

Open
#2,344 4 comments 0 reactions 1 assignee View on GitHub

@odrotbohm is already working on this.

Since Aug 12, 2025.

in: mediatypes process: waiting for feedback type: enhancement
Dominant language
Java
Stars
1.1k
Forks
476
PR merge metrics
No merged PRs in 30d

Description

Today, many HAL-FORMS components such as HalFormsMediaTypeConfiguration and Jackson2HalFormsModule mixins are package private, while their HAL counterparts are public.

This prevents us from extending HAL-FORMS as allowed by the specification:

7. Extending the HAL-FORMS Document
Authors can extend the HAL-FORMS media type as long as the following rules are observed:

No existing properties or objects are removed.

No existing properties or objects or the list of valid values are altered in a way that is non-backward compatible (e.g. changes MUST NOT break existing implementations that adhere to this specification).

All new properties or objects are treated as OPTIONAL (e.g. no new REQUIRED elements are introduced in an extension).

Warning
Authors should be aware that a future version of this specification MAY add new elements and should take care that any extensions are implemented in a way that reduces the likelihood that a future version of this specification is in conflict with your extension.

Are there reasons to keep hiding these elements? Or could we consider make some public?

We'd like the following to become public:

  • all inner classes of Jackson2HalFormsModule
  • HalFormsMediaTypeConfiguration

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.