Skip to content

Issue on validation when exposing a multipart/form-data API #347

@marco-basso

Description

@marco-basso

The feauture or bug you are proposing

Issue on validating a multipart/form-data request

The description of the bug or the rationale of your proposal

The schema definition of a mutlipart/form-data part requires the following body structure:

{
  additionalProperties: false,
  properties: {
    part: {
      description: 'Binary content of the file to upload',
      format: 'binary',
      type: 'string',
    },
  },
  required: ['part'],
  type: 'object',
}

Calling the endpoint with a binary file uploaded through the part field does return a validation error which states: 'body.part must be string`

The expected result for your bug

I expect that this validation error should not happen

Your environment

node: 8.15.0

custom-plugin-lib: 4.3.2

os: 20.04.5 LTS (Focal Fossa), Ubuntu

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions