Open mshabarov opened 7 months ago
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)
Yeah, it would be reasonable to skip it. Let's also check if skipping it has any side effects.
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 byAtEndpoint
orAtBrowserCallable
, which leads to wrong detection and not generating the endpoints in the end.Describe the solution you'd like
Vaadin Flow can check:
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.AtEndpoint
orAtBrowserCallable
annotations in the project.Additional context
Vaadin 24.4.