Closed codyseavey closed 5 years ago
Hi @codyseavey I just tried this api with similar code you posted here, everything is fine. I tweaked your code a little bit.
apiParameters := &apimanagement.APICreateOrUpdateParameter{
APICreateOrUpdateProperties: &apimanagement.APICreateOrUpdateProperties{
DisplayName: &apiName,
Value: &content,
// Format: apimanagement.Openapijson, // I removed this to by pass the constraints
Path: &apiName,
Protocols: &[]apimanagement.Protocol{"https"},
SubscriptionRequired: to.BoolPtr(false), // you will need to import "github.com/Azure/go-autorest/autorest/to" here
},
}
After executed this piece of code, I use rest api GET to verify the SubscriptionRequired
field, which is false. Please have a try.
If you have further questions, please feel free to comment below, I will reopen this issue then.
Thanks for working with Microsoft on GitHub! Tell us how you feel about your experience using the reactions on this comment.
Bug Report
github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-01-01/apimanagement
versions:
go version go1.12.5 linux/amd64
What happened? API's in an APIM that are created with the following code require Subscriptions.
This is the setting that was expected to be unchecked in the API.