Endpoint inheritance

Hey all! Wasn’t able to find anything in here about this, or online but is there a way to do some controller inheritance with the hilla TS generator? I have a setup where a controller is extending another one, but when the child controller gets generated out to react, it doesn’t include the parent method/endpoint. The parent function is callable when I get a breakpoint set, so it’s working to that degree.

This might actually be a spring boot limitation, not a hilla issue. Welcome to any suggestions though. Basically have a bunch of entities I want to expose basic CRUD endpoints for, but have it fairly low boilerplate for each.

You should probably annotate the parent class with @EndpointExposed

Doh, that would probably help.

Could you point me in the direction of what file has all the openapi magic in it? What does hilla use for a openapi file generation package?

Unfortunately my Hilla knowledge is limited.
Let’s wait for an answer by someone from the Hilla team

@full-of-life-owl might know something about the openapi magic.

It may be some of the inheritance I’m trying to do, can provide an example but when I add the @EndpointExposed to my abstract class Controller I get a bunch of errors from a generated file:
image.png

file generated out is: frontend/generated/org/springframework/http/HttpStatusCodeModel.ts

Ahh, it was coming from returning a ResponseEntity as a type for an endpoint.

https://github.com/vaadin/hilla/issues/1741

Not sure if you want to add my affected version, but using: 2.1.7

Since it’s reproducible in the latest version, we should aim to fix it there, and backport the fix to all versions that are still supported.