Skip to content

Issue with [Site Recovery] / API Version [2022-10-01] #387

@ziyeqf

Description

@ziyeqf

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Service Used

Site Recovery

API Versions Used

2022-10-01

Description

The object in Swagger was described as optional but there is no omitempty label in go-azure-sdk.

Swagger Definition: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/service.json#L10876

go-azure-sdk: https://github.com/hashicorp/go-azure-sdk/blob/main/resource-manager/recoveryservicessiterecovery/2022-10-01/replicationprotecteditems/model_disableprotectioninputproperties.go#L13

the correct request payload and response

{
    "properties": {
        "replicationProviderInput": null
    }
}
{
    "error": {
        "code": "BadRequest",
        "details": [
            {
                "activityId": "xxxx",
                "clientRequestId": "xxxx",
                "code": "FailedToStartOperation",
                "message": "Failed to start operation. Verify input and try operation again.",
                "possibleCauses": "Invalid parameters were specified.",
                "recommendedAction": "Verify the input and try again."
            }
        ],
        "message": "Failed to start operation. Verify input and try operation again."
    }
}

the failed request payload and response

{
    "properties": {}
}

response is HTTP 202 without body

References

Azure/azure-rest-api-specs#22947

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions