Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ private Inline(Collection<? extends Object> values, @Nullable String promptRef,
* @return
*/
@JsonProperty
@JsonInclude(Include.ALWAYS)
public Collection<? extends Object> getInline() {
return inline;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,27 @@ void rendersFullInlineOptions() {
});
}

@Test // #2257
void rendersEmptyInlineOptions() {

var options = HalFormsOptions.inline()
.withPromptField("my-prompt-field")
.withValueField("my-value-field")
.withMinItems(2L)
.withMaxItems(3L);

getCuriedMapper()
.assertSerializes(options)
.into(result -> {

assertThat(result.read("$.inline", Collection.class)).isEmpty();
assertThat(result.read("$.promptField", String.class)).isEqualTo("my-prompt-field");
assertThat(result.read("$.valueField", String.class)).isEqualTo("my-value-field");
assertThat(result.read("$.minItems", Long.class)).isEqualTo(2L);
assertThat(result.read("$.maxItems", Long.class)).isEqualTo(3L);
});
}

@Test // #2257
void rendersFullRemoteOptions() {

Expand Down
Loading