Azure / azure-rest-api-specs

The source for REST API specifications for Microsoft Azure.
MIT License
2.68k stars 5.1k forks source link

MachineLearningService Workspaces_CreateOrUpdate returns 202 but the `responses` field only defines status code `200` and `201` as succeed #8029

Open ArcturusZhang opened 4 years ago

ArcturusZhang commented 4 years ago

The responds now reads:

        "responses": {
          "200": {
            "description": "The request was successful; the request was well-formed and received properly.",
            "schema": {
              "$ref": "#/definitions/Workspace"
            }
          },
          "201": {
            "description": "The request was successful; the request was well-formed and received properly.",
            "schema": {
              "$ref": "#/definitions/Workspace"
            }
          },
          "default": {
            "description": "Error response describing why the operation failed",
            "schema": {
              "$ref": "#/definitions/MachineLearningServiceError"
            }
          }
        }
      },

But the call of rest api returns status code 202 as following: Screen shot of the rest api response This will be handled as failure in generated SDK since this status code is not among the expected ones. For instance, in go SDK:

machinelearningservices.WorkspacesClient#CreateOrUpdate: Failure responding to request: StatusCode=202 -- Original Error: autorest/azure: error response cannot be parsed: "" error: EOF
rastala commented 4 years ago

@ArcturusZhang Thank you for reporting this issue, we've added the bug to our backlog.