get请求参数中的@AO\JsonContent

@AO\JsonContent in parameter of get request

在使用 OpenApi 规范的 swagger 文档中,您可以将参数中的模式包装为内容 application/json:

parameters:
  - in: query
    name: filter

    # Wrap 'schema' into 'content.<media-type>'
    content:
      application/json:  # <---- media type indicates how to serialize / deserialize the parameter content
        schema:
          type: object
          properties:
            type:
              type: string
            color:
              type: string 

发送这样的对象filter={"type":"t-shirt","color":"blue"}。 如何大摇大摆-php?

swagger-editor 和 swagger-ui 添加了对 http://swagger.io/docs/specification/describing-parameters

的支持

swagger-php 库也添加了支持,it 将成为 3.0.4 版本的一部分。