Skip to content

OpenApi with multipart & TempFile  #120

Open
@AzHicham

Description

@AzHicham

Hello,

I would like to generate an openapi def for this struct:

#[derive(Debug, MultipartForm, ApiType)]
pub struct UploadForm {
    pub main: TempFile,
    pub dependencies: Vec<TempFile>,
}

impl TypedSchema for UploadForm {
    fn schema_type() -> InstanceType {
        InstanceType::Object
    }

    fn format() -> Option<String> {
        None
    }
}

Unfortunately I'm stuck on how to do that, obviously I cannot use JsonSchema since it doesn't work with TempFile.
Any help would be really appreciated.

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedCurrently blocked

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions