larshp / ABAP-Swagger

Expose ABAP REST services with Swagger/openapi spec
MIT License
97 stars 40 forks source link

method run of zcl_swag can pick up wrong method if method names are simular enough #84

Closed arcanist123 closed 3 months ago

arcanist123 commented 3 months ago

assume you have method1 and method1_test the current code is doing the following FIND REGEX -meta-url-regex IN lv_path. https://github.com/larshp/ABAP-Swagger/blob/main/src/zcl_swag.clas.abap line 610 if can call method1 even though the handler for method1_test was called

larshp commented 3 months ago

thanks, pull requests welcome

arcanist123 commented 3 months ago

I was stupid, just needed to play around the regex. In my case, since I have handlers as post methods, it was enough to add $ at the end of the regex to solve the issue above