After adding two methods to the annotated @Api class: get() and update() there are 3 methods created by Endpoints:
*.get , which is generated directly for the get() method*.update , which is generated directly for the update() method*.patch , which is apparently generated indirectly after inserting the get() and update() labels into the annotated class.
I see these three methods through the Explorer API on my local server. The code I used to create the endpoint is located at the end of this question.
My question is: why is the third patch method generated? Is it on purpose? If so, how to use this method? Is it used from external customers or is it serviced for internal use only?
Here is my endpoint api class:
@Api (name = "sample_endpoint") public class SampleEndpoint { public Entity get() { return new Entity(); } public Entity update(Entity entity) { return entity; } public class Entity { public String parameter = "Validated ok."; public String getParameter() { return parameter; } } }
source share