Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby 当Grape API为哈希或数组且内部值为'时,如何显示其参数;t定义为招摇过市文档_Ruby_Swagger_Swagger Ui_Grape Api - Fatal编程技术网

Ruby 当Grape API为哈希或数组且内部值为'时,如何显示其参数;t定义为招摇过市文档

Ruby 当Grape API为哈希或数组且内部值为'时,如何显示其参数;t定义为招摇过市文档,ruby,swagger,swagger-ui,grape-api,Ruby,Swagger,Swagger Ui,Grape Api,我正在使用swagger文档在GrapeAPI中生成API文档。API参数的定义如下: desc "Get results by query" params do requires :type, type: String, desc: "search type" requires :body, type: Hash, desc: "query body" optional :user, type: Hash, desc: "support search

我正在使用swagger文档在GrapeAPI中生成API文档。API参数的定义如下:

desc "Get results by query"
  params do
    requires :type, type: String,  desc: "search type"
    requires :body, type: Hash,    desc: "query body"
    optional :user, type: Hash,    desc: "support search as other user, otherwise search as current user" do
      requires :id,         type: String, desc: "user id"
      requires :name,       type: String, desc: "user name (dn)"
      requires :directory,  type: String, desc: "directory user belongs to"
    end
  end
  post :query do
仅显示与用户相关的参数。如何定义其密钥不受限制且可以在API文档中生成的哈希参数