Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RequestBody not supported by operation macro #457

Closed
Geekfish opened this issue May 26, 2022 · 0 comments · Fixed by #456
Closed

RequestBody not supported by operation macro #457

Geekfish opened this issue May 26, 2022 · 0 comments · Fixed by #456

Comments

@Geekfish
Copy link
Contributor

Geekfish commented May 26, 2022

The operation macro currently supports passing arguments for url params, request body and response schemas in a "simplified" way (as tuples/keyword lists).

It also supports passing operation structs like %Parameter{} and %Response{}.

However, it doesn't support passing %RequestBody{}, for example this:

operation :update
  summary: "Update user",
  request_body: %RequestBody{
    #...
  }
  # ...

results in %Operation{requestBody: nil}.

The expected behaviour would be to return %Operation{requestBody: %RequestBody{}}.

I have submitted a simple fix here: #456

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant