rmannibucau commented on pull request #20:
URL: https://github.com/apache/geronimo-openapi/pull/20#issuecomment-623553039


   Hi @jgallimore ,
   
   most of our users don't use mp-rest-client (plain JAXRS 2 client AFAIK) so I 
think we shouldnt import it and break if not in the classpath (extension code).
   
   There is also a case MP forget there: you create a contract (as an 
interface), create the dynamic client (@RegisterRestClient) from it AND 
implement it (server so it must end up in openapi) - this is a not that rare 
pattern in uservice proxies these days. This change breaks this use case I 
think.
   
   
   I see multiple options there (none perfect):
   
   1. configure the tck through standard MP openapi excludes config entry 
(think it is not insane by itself to ask the user to exclude a bean he does not 
want in the openapi.json)
   2. (likely very tomee oriented) make findEndpointsAndApplication (or new 
method) protected and in tomee you skip default impl in favor of a subclass
   3. add config to enrich the ignore logic
   4. add a SPI to ignore bean, it can take the form of a fireEvent(new 
FindFilter()) in BeforeBeanDiscovery of the extension, another extension will 
observe it do an event.registerFilter(Predicate<AnnotatedType<?>>) and use that 
in findEndpointsAndApplication
   
   side note: not very important and unrelated to this particular pr but think 
we should move the typename check before the annotation check no?
   
   personally I think 1 is sane but I can understand 4 makes sense too. I'm not 
a fan at all of 3 since it will make it more complex for a poor gain IMHO.
   
   Hope it makes sense.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to