Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

不能正确解析response内非$ref的schema内容 #39

Open
lephix opened this issue Nov 20, 2018 · 1 comment
Open

不能正确解析response内非$ref的schema内容 #39

lephix opened this issue Nov 20, 2018 · 1 comment

Comments

@lephix
Copy link

lephix commented Nov 20, 2018

案例:

{
  "get": {
    "summary": "第一个list功能",
    "deprecated": false,
    "produces": [
      "*/*"
    ],
    "operationId": "list3GET4997028859787988992",
    "responses": {
      "200": {
        "schema": {
          "type": "object",
          "properties": {
            "id": {
              "name": "id",
              "in": "formData",
              "description": "标识的desc",
              "required": true,
              "type": "string"
            },
            "createTime": {
              "name": "createTime",
              "in": "formData",
              "description": "时间的desc",
              "required": false,
              "type": "string"
            }
          }
        },
        "description": "返回profile列表"
      }
    },
    "description": "list的description",
    "parameters": [
      {
        "name": "id",
        "in": "formData",
        "description": "标识的desc",
        "required": true,
        "type": "string"
      },
      {
        "name": "createTime",
        "in": "formData",
        "description": "时间的desc",
        "required": false,
        "type": "string"
      }
    ],
    "tags": [
      "profile"
    ],
    "consumes": [
      "application/xml"
    ]
  }
}

在responses里面的schema不能正确的展示。 该问题在springfox-swagger-ui等其他工具上可以正确展示。如果schema内容为$ref指到definitions内的元素,展示没有问题。

@caspar-chen
Copy link
Owner

谢谢反馈,这个问题会在下个版本修复掉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants