Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 task done
ziyeqf opened this issue Mar 24, 2023 · 0 comments
Open
1 task done

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

ziyeqf opened this issue Mar 24, 2023 · 0 comments

Comments

@ziyeqf
Copy link

ziyeqf commented Mar 24, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants