Skip to content

Type Mapping with format not working #119

Closed
openapi-processor/openapi-processor-core
#33
@schlagi123

Description

@schlagi123

Hi,

here my mapping.yaml and opanapi.yaml

openapi-processor-mapping: v2

options:
  package-name: de.vwn.inbound.smartdcm.api.generated

map:
  types:
    - type: array => java.util.List
    - type: string:binary => org.springframework.web.multipart.MultipartFile
openapi: 3.0.2

info:
  title: Service
  description: API
  version: 1.0.0

paths:
  /download:
    get:
      summary: download an avatar
      operationId: get_avatar
      tags:
        - user
      parameters:
        - in: query
          name: test
          schema:
            type: array
            items:
              type: string
      responses:
        200:
          description: user avatar
          content:
            application/*:
              schema:
                type: string
                format: binary

The result is the following Interface:

public interface UserApi {
    @GetMapping(path = "/upload", produces = {"application/*"})
    MultipartFile getAvatar(@RequestParam(name = "test", required = false) List<MultipartFile> test);
}

spring processor version: 1.0.0.M19
gradle plugin version: 1.0.0.M8

The mapping of the return type is correct, but the mapping of the parameter is wrong. List was expected by me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions