rmannibucau commented on issue #4: GERONIMO-6670 - fixing text/html issue and 
tests (snake dependency wa…
URL: https://github.com/apache/geronimo-openapi/pull/4#issuecomment-451571369
 
 
   It should be good on master.
   
   However I will take the opportunity to put there some notes for later and 
work considered within the fix and not in the PR:
   
   1. we likely don't want to add snakeyaml (you can reuse jackson if you 
absolutely need a mapper in tests)
   2. we can't ignore html just like that, then next issue would be xhtml, xml, 
webp, apng etc... so it doesnt fix the issue reliably but just moves it further
   3. this fix potentially breaks an app or server since it is fine to use html 
(tip: this is one of the most simplest and efficient way to implement a custom 
UI for openapi) so we can't hardcode any exclusion except for wildcard which 
means nothing. I insist on this one since it is one of the base of JAX-RS and 
Microprofile being based on JAX-RS it can't break its own feet.
   
   Master fixes uses the fact that when there is no "handler" we default on the 
openapi spec default. Side note being it sounds very acceptable like that but 
actually it can break clients. If I request a properties formatting and get a 
yaml i will not be able to deserialize whereas i could have handled the 415 to 
fallback on JSON (or Yaml). In other words we can revert this request later if 
users complain we don't return the right status. This is however a bug in 
OpenAPI spec since it shouldn't "default" to yaml (or anything). This is why 
the "fix" is acceptable at the end.
   
   Hope it is understable and complete ;), starts to be late to code here ;).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to