Skip to content

Auto-detection for Hilla's endpoints #18800

Closed
vaadin/hilla
#2938

Description

@mshabarov

Describe your motivation

Vaadin Flow adds endpoints generation Node Tasks (see NodeTasks::addEndpointServicesTasks) if Hilla's views are present and base Hilla class is in class path.
This, however, doesn't take into account a presence of endpoint classes marked by AtEndpoint or AtBrowserCallable, which leads to wrong detection and not generating the endpoints in the end.

Describe the solution you'd like

Vaadin Flow can check:

  • the presence and content of a frontend/generated/openapi.json file (if this file exists at the point where we need to take a decision in Flow about starting the generator), specifically the "tags" json array.
  • presence of any AtEndpoint or AtBrowserCallable annotations in the project.

Additional context

Vaadin 24.4.

Activity

  1. mcollovati commented on Feb 26, 2024

    @mcollovati
    Collaborator

    Can we also prevent running TaskGenerateEndpoint if there are no endpoint annotated classes? (I mean when potential Hilla views are detected, but there are no endpoint implementations)

  2. mshabarov commented on Feb 26, 2024

    @mshabarov
    ContributorAuthor

    Yeah, it would be reasonable to skip it. Let's also check if skipping it has any side effects.

  3. moved this from Maybe to Done / Pending Release in Vaadin Flow enhancements backlogon Feb 3, 2025
  4. added a commit that references this issue on Feb 3, 2025
    21a4145
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions