Skip to content

OpenAPI, multipart and :request #759

@opqdonut

Description

@opqdonut

@dzhus writes

I wonder if there's a way to use this form (:request) to specify an equivalent of what one can currently do with {:parameters {:multipart?

It appears that {:schema is only picked up by request body coercion.

(and the old form with {:parameters {:multipart .. :body ..} specified results in a OpenAPI spec missing the description for application/json content-type and associated request body schema – I'm trying to have the two content-types supported under the same endpoint, with accurate schemas communicated per each content type)

There are two issues here:

  1. multipart-middleware doesn't know to look under :request. Should be straightforward to make it look there.
  2. OpenAPI generation doesn't do what's expected when it encounters :parameters {:multipart .. :body ..}. I'll have a look at if this is fixable.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

🐰 Important

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions