Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/315.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
Java 招摇过市注释-没有参数时不包括参数?_Java_Rest_Swagger_Swagger Editor - Fatal编程技术网

Java 招摇过市注释-没有参数时不包括参数?

Java 招摇过市注释-没有参数时不包括参数?,java,rest,swagger,swagger-editor,Java,Rest,Swagger,Swagger Editor,我已经将swagger-jersey2-jaxrs 1.5.1-M2与Drop wizard集成。我已经使用我在资源和模型中包含的招摇注释生成了以下yaml: --- swagger: "2.0" info: version: "1.0.0" title: "test Application" tags: - name: "test" paths: /v1/test/version: get: tags: - "v1test" su

我已经将swagger-jersey2-jaxrs 1.5.1-M2与Drop wizard集成。我已经使用我在资源和模型中包含的招摇注释生成了以下yaml:

    ---
swagger: "2.0"
info:
  version: "1.0.0"
  title: "test Application"
tags:
- name: "test"
paths:
  /v1/test/version:
    get:
      tags:
      - "v1test"
      summary: "version number of test"
      description: "Returns version number of test"
      operationId: "getVersionAndBuildInfo"
      produces:
      - "application/json"
      parameters: 
      responses:
        404:
          description: "build number not found."
        200:
          description: "successful operation"
          schema:
            type: "array"
            items:
              $ref: "#/definitions/testInformation"
definitions:
  testInformation:
    properties:
      build:
        type: "string"
        description: "test build number"
      version:
        type: "string"
        description: "test version number"
      buildTimestamp:
        type: "string"
        description: "test build timestamp"
    description: "model for test version information"
请注意,参数:包含在从swagger生成的yaml中。当我在swagger editor 2.0中粘贴它时,它抛出了一个错误,说“数组太短(0),最小值1”


当URL不需要任何参数时,是否有办法不在yaml中生成参数:?我没有包含任何参数注释,它仍然显示在生成的yaml上

我们在JSON模式中有一个错误,该错误用于不允许空参数的招摇过市定义。这是固定的,并将很快在斯威格编辑器

请跟随查看它何时更新

在生成过程中尝试“解决”这个问题没有意义,因为输出没有错误