Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/39.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
Node.js swaggerhub和restapi_Node.js_Swagger - Fatal编程技术网

Node.js swaggerhub和restapi

Node.js swaggerhub和restapi,node.js,swagger,Node.js,Swagger,我使用swaggerHub来编写新应用程序节点的文档,但我有一个api的问题 我的API需要两个参数。 示例:POST 好的,如果你想使用这个API,你必须给出两个值。我的问题是,swaggerHub的文档只提供了一个参数的示例 请问,你有两个参数的例子吗?可能吗?如果您这样做,谢谢您: "/{service}/{action}": x-swagger-router-controller: serviceController post: summary: To p

我使用swaggerHub来编写新应用程序节点的文档,但我有一个api的问题

我的API需要两个参数。 示例:POST

好的,如果你想使用这个API,你必须给出两个值。我的问题是,swaggerHub的文档只提供了一个参数的示例


请问,你有两个参数的例子吗?可能吗?如果您这样做,谢谢您:

  "/{service}/{action}":
    x-swagger-router-controller: serviceController
    post:
      summary: To perform an action
      operationId: serviceAction
      parameters:
      - name: service
        in: path
        required: true
        type: string
        description: Request Path Param for service
      - name: action
        in: path
        required: true
        type: string
        description: Request Path Param for Action
      responses:
        '200':
          description: Success
          schema:
            "$ref": "#/definitions/SuccessResponse"
        default:
          description: Error
          schema:
            "$ref": "#/definitions/ErrorResponse"
definitions:
  SuccessResponse:
    type: object
  ErrorResponse:
    required:
    - error
    properties:
      error:
        type: string

你尝试过什么,什么对你不起作用?我不确定我是否理解——你是在问如何使用招摇过市?