Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quarkus-hal omits link params from response entity #44452

Closed
gilday opened this issue Nov 12, 2024 · 5 comments · Fixed by #44501
Closed

quarkus-hal omits link params from response entity #44452

gilday opened this issue Nov 12, 2024 · 5 comments · Fixed by #44501
Labels
kind/bug Something isn't working

Comments

@gilday
Copy link

gilday commented Nov 12, 2024

Describe the bug

Quarkus HAL extension omits extra params beyond "href" in its response.

Expected behavior

The quarkus-hal extension should include all link attributes in the a link object in its response.

In this example, the "title" attribute is expected to be in the HAL response

  public HalEntityWrapper<Greeting> hello(final String subject) {
    final var link = Link.fromResource(SubjectResource.class).rel("subject").title(subject).build();
    final var greeting = new Greeting(Language.ENGLISH, "Hello, " + subject);
    return new HalEntityWrapper<>(greeting, link);
  }
{
  "_links": {
    "subject": {
      "href": "/subject",
      "title": "World"
    }
  }
}

Actual behavior

Quarkus HAL extension only includes the href attribute in the link.

{
  "_links": {
    "subject": {
      "href": "/subject"
    }
  }
}

How to Reproduce?

hal-title-missing.zip

Output of uname -a or ver

Darwin pixee-mbp-gilday.local 24.0.0 Darwin Kernel Version 24.0.0: Tue Sep 24 23:39:07 PDT 2024; root:xnu-11215.1.12~1/RELEASE_ARM64_T6000 arm64

Output of java -version

openjdk version "21.0.3" 2024-04-16 LTS OpenJDK Runtime Environment Temurin-21.0.3+9 (build 21.0.3+9-LTS) OpenJDK 64-Bit Server VM Temurin-21.0.3+9 (build 21.0.3+9-LTS, mixed mode)

Quarkus version or git rev

3.16.2

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.9.8 (36645f6c9b5079805ea5009217e36f2cffd34256) Maven home: /Users/jgilday/.m2/wrapper/dists/apache-maven-3.9.8-bin/337e6d14/apache-maven-3.9.8 Java version: 21.0.3, vendor: Eclipse Adoptium, runtime: /Library/Java/JavaVirtualMachines/temurin-21.jdk/Contents/Home Default locale: en_US, platform encoding: UTF-8 OS name: "mac os x", version: "15.0.1", arch: "aarch64", family: "mac"

Additional information

No response

@gilday gilday added the kind/bug Something isn't working label Nov 12, 2024
@geoand
Copy link
Contributor

geoand commented Nov 13, 2024

cc @Sgitario

@Sgitario
Copy link
Contributor

I will work in this today

@geoand
Copy link
Contributor

geoand commented Nov 14, 2024

🙏🏽

@Sgitario
Copy link
Contributor

#44501 should address this.

@Sgitario Sgitario linked a pull request Nov 14, 2024 that will close this issue
@Sgitario
Copy link
Contributor

Closed as #44501 was merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants