最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

OpenApi: Spec for multipartform-data with dynamic number of files - Stack Overflow

programmeradmin0浏览0评论

OpenAPI spec defines the possibility to specify parts of multipart request:

requestBody:
  content:
    multipart/form-data:
      schema:
        type: object
        properties:
          metadata:
            type: object
            properties:
              propA:
                type: string
              propB:
                type: string
          file:
            type: string
            format: binary

However, I'm looking for a way, do define arbitrary (dynamic) number of files, which can be sent on the API.

E.g. something like this:

requestBody:
  content:
    multipart/form-data:
      schema:
        type: object
        properties:
          metadata:
            type: object
            properties:
              propA:
                type: string
              propB:
                type: string
          file:
            type: array
            items: 
              type: string
              format: binary

Is this supported by OpenApi spec ?

发布评论

评论列表(0)

  1. 暂无评论