larshp / ABAP-Swagger

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

Structure name as reponse #61

Closed BlackmanCC closed 3 years ago

BlackmanCC commented 4 years ago

60 Structure name of returning parameter of handler method is now used as response in Models section. Before the method handler name was used.

Multiple methods with same returning parameter led to multiple Models entries with same structure. Also registering multiple Classes with methods having identical names led to error in swagger parsing.

BlackmanCC commented 3 years ago

@larshp I hope you can check the requests... THX

larshp commented 3 years ago

I guess there is the same problem regarding Requests? should align both request and response to use the same approach?

    lv_string = |"{ is_meta-meta-handler }_Request": \{{ lv_type }\}|.
    APPEND lv_string TO mt_definitions.

https://github.com/larshp/ABAP-Swagger/blob/e05e82c778aff11502949546d224c2a31fcbdce9/src/zcl_swag_spec.clas.abap#L332

BlackmanCC commented 3 years ago

that's right. good point. I will check on this an fix it later. Thanks

BlackmanCC commented 3 years ago

@larshp Please check again. new definitions model also implemented for requests

larshp commented 3 years ago

thanks 👍 lets try this, merging

welcome as a contributor 🎉