spring-projects / spring-projects/spring-hateoas

Missing documentation / bug? - What is HalFormsOptions.selectedValue about?

Open
#2,400 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.1k
Forks
476
PR merge metrics
No merged PRs in 30d

Description

The specification mentions property.value (to express a single, selected value) and property.options.selectedValues to express a list of selected values.

The HalFormsOptions.selectedValue field seems to be neither of those things?

The field seems to become property.value (singular) in the template, but in that case the naming seems off (it should not be part of the "property.options", but it should be directly on the property. The property.options only has the selectedValues field for the values, according to the specification.

The javadoc for the HalFormsOptions.getSelectedValue() is also missing, making it hard to guess the intent of this field. Is this an oversight?

It would be great to have a HalFormsOptions.getSelectedValues() that behaves according to the specification and maybe the currentHalFormsOptions.getSelectedValue() should be deprecated and replaced by something else, that is related to the property more clearly (instead of sitting on the options sub-object).

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.

Research direction

Start by comparing the specification's property.value and property.options.selectedValues with HalFormsOptions.selectedValue and getSelectedValue(). Read the HalFormsOptions API and related template usage to establish the intended naming and behavior; done means the discrepancy is resolved and the public API or its documentation clearly matches the specification.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.