cjbooms / fabrikt

Generates Kotlin Code from OpenApi3 Specifications
Apache License 2.0
145 stars 36 forks source link

DELETE doesn't propagate the body #225

Open slinkydeveloper opened 11 months ago

slinkydeveloper commented 11 months ago

The HTTP DELETE method supports a body, as defined in https://www.rfc-editor.org/rfc/rfc7231#section-4.3.5:

A payload within a DELETE request message has no defined semantics; sending a payload body on a DELETE request might cause some existing implementations to reject the request.

But the code generator simply ignores it. It should be easy to fix by changing this line of code: https://github.com/cjbooms/fabrikt/blob/master/src/main/kotlin/com/cjbooms/fabrikt/generators/client/OkHttpSimpleClientGenerator.kt#L212

slinkydeveloper commented 11 months ago

A proposed PR here: https://github.com/cjbooms/fabrikt/pull/226