Skip to content

支持swagger group模式 "/v2/api-docs?group=xxx" #109

@itbeihe

Description

@itbeihe

Steps to reproduce

项目设置中swagger api doc输入 http://127.0.0.1:8080/v2/api-docs?group=sku ,然后同步 swagger 接口。

What is Expected?

接口列表更新

What is actually happening?

接口列表没有更新,后台日志报“/api/project/update_swagger, 基于 Swagger 更新 Mock 发生异常” “Request failed with status code 404”

Why

在 /util/swagger.js 253行,swagger 地址只取了query之前的路径。query 在创建时候被丢弃。

  const swaggerUrl = project.swagger_url.split('?')[0]
  const params = {url: swaggerUrl} 

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