-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
[HDInsight] Add Capabilities to Stable API version,Modify ApplicationType,AccessModes to enum #6665
[HDInsight] Add Capabilities to Stable API version,Modify ApplicationType,AccessModes to enum #6665
Conversation
SDK Automation [Logs] (Generated from a22cf02, Iteration 12)Go: Azure/azure-sdk-for-go [Logs] [Diff]Java: Azure/azure-sdk-for-java [Logs] [Diff]Python: Azure/azure-sdk-for-python [Logs] [Diff]
JavaScript: Azure/azure-sdk-for-js [Logs] [Diff]
|
Automation for azure-sdk-for-pythonThe initial PR has been merged into your service PR: |
Automation for azure-sdk-for-goThe initial PR has been merged into your service PR: |
Can one of the admins verify this patch? |
Automation for azure-sdk-for-javaA PR has been created for you based on this PR content. Once this PR will be merged, content will be added to your service PR: |
ecb5ee7
to
f8c3994
Compare
"x-ms-enum": { | ||
"name": "ApplicationHttpsEndpointAccessMode", | ||
"modelAsString": true | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a breaking change. Also a bit confused why do we have preview-api-version under stable directory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a breaking change. Also a bit confused why do we have preview-api-version under stable directory?
@anuchandy This is intentional. It’s a little confusing, but per rule #5 here, whether the swagger spec is in the preview or stable folder “is not a direct analog for whether or not an API Version has the ‘-preview’ suffix or not. SDKs that are generated from 'preview' folder items should indicate to their customers in the most idiomatic way that breaking changes may still be coming.”
Basically the short version is that HDInsight is a GA service that still has an API with a -preview tag. Somebody made the decision several years ago to release stable versions of Hydra/Hyak SDKs for .NET, JavaScript, etc. that consumed this the -preview API. We are now releasing stable swagger-based SDKs so we can at least finally deprecate the Hydra/Hyak SDKs. As a result, we are making a commitment that we will not make breaking changes to this swagger spec version so we can GA some swagger-based SDKs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aim-for-better to address the "is this a breaking change" question - as per my comment on the other enum change, please confirm that WebPage is the only actual value the server can accept and return, and I think we're good.
"x-ms-enum": { | ||
"name": "ApplicationType", | ||
"modelAsString": true | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
breaking change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
breaking change.
Hi anuchandy, Why do you think it is a breaking change?
I have tested the generated .NET SDK based this swagger spec. In .NET SDK, it is not a breaking change. Because the modelAsString
is true, it will change it to enum in .NET SDK
Can you give me a example that confirm that it will bring up a breaking change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO this is only a breaking change if server can return a value (or allow setting a value) that isn't specified in this list. Otherwise, I don't see a problem. @aim-for-better please confirm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO this is only a breaking change if server can return a value (or allow setting a value) that isn't specified in this list. Otherwise, I don't see a problem. @aim-for-better please confirm.
@antmarti-microsoft Thanks for you opinion. Now Rp server side only support these two types. So I think there is no problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aim-for-better - the scope of breaking change is different for different languages, for example in java this cause generating a model that extends from ExpandableStringEnum with one value WebPage, like this. I agree that this is not a breaking change in API Level.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aim-for-better - the scope of breaking change is different for different languages, for example in java this cause generating a model that extends from ExpandableStringEnum with one value WebPage, like this. I agree that this is not a breaking change in API Level.
Hi @anuchandy I have tested the java code, I think you are right. However the PR has been merged. So I will pull a new request to fix this breaking change.
"$ref": "#/definitions/QuotaCapability" | ||
} | ||
} | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess all properties of CapabilitiesResult
model and the model it composes should be readonly, could you double check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess all properties of
CapabilitiesResult
model and the model it composes should be readonly, could you double check?
Hi anuchandy, I have added the readonly parameter
cef6f97
to
1a06967
Compare
.../hdinsight/resource-manager/Microsoft.HDInsight/preview/2015-03-01-preview/applications.json
Show resolved
Hide resolved
}, | ||
"subDomainSuffix": { | ||
"type": "string", | ||
"description": "The subDomainSuffix of the application and can not greater than 3 characters." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please improve the readability of these descriptions (correct grammar, use words instead of writing subDomainSuffix
). Note you can use the "maxLength" property to enforce the 3 character restriction.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please improve the readability of these descriptions (correct grammar, use words instead of writing
subDomainSuffix
). Note you can use the "maxLength" property to enforce the 3 character restriction.
Updated. Remove "can not greater than 3 characters" and don't use maxLength
}, | ||
"disableGatewayAuth": { | ||
"type": "boolean", | ||
"description": "The value indicates whether to disable GatewayAuth." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about something simpler like "Disable gateway authentication"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about something simpler like "Disable gateway authentication"
Updated
"x-ms-enum": { | ||
"name": "ApplicationType", | ||
"modelAsString": true | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO this is only a breaking change if server can return a value (or allow setting a value) that isn't specified in this list. Otherwise, I don't see a problem. @aim-for-better please confirm.
"x-ms-enum": { | ||
"name": "ApplicationHttpsEndpointAccessMode", | ||
"modelAsString": true | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aim-for-better to address the "is this a breaking change" question - as per my comment on the other enum change, please confirm that WebPage is the only actual value the server can accept and return, and I think we're good.
}, | ||
"QuotaCapability": { | ||
"description": "The regional quota capability.", | ||
"properties": { | ||
"cores_used": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please ensure you address this naming in your next API version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please ensure you address this naming in your next API version
Yes. I have created a issue #6724
"type": "integer", | ||
"format": "int64" | ||
}, | ||
"max_cores_allowed": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please ensure you address this naming in your next API version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please ensure you address this naming in your next API version
Yes. I have created a issue #6724
where: | ||
- $.definitions.CapabilitiesResult.properties.vmSize_filters | ||
- $.definitions.RegionalQuotaCapability.properties.cores_available | ||
- $.definitions.RegionalQuotaCapability.properties.cores_used | ||
- $.definitions.RegionalQuotaCapability.properties.region_name | ||
- $.definitions.QuotaCapability.properties.cores_used | ||
- $.definitions.QuotaCapability.properties.max_cores_allowed | ||
- $.definitions.VmSizeCompatibilityFilter.properties.ClusterVersions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the problem with $.definitions.VmSizeCompatibilityFilter.properties.ClusterVersions
and all the other $.definitions.VmSizeCompatibilityFilter.properties.*
property names. The casing looks fine - do they need to be added to this suppression?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the problem with
$.definitions.VmSizeCompatibilityFilter.properties.ClusterVersions
and all the other$.definitions.VmSizeCompatibilityFilter.properties.*
property names. The casing looks fine - do they need to be added to this suppression?
@antmarti-microsoft In fact swagger violation tools require lowerCamelCase. So the recommended usage is clusterVersions
etc. This is why we need add this suppression.
…Mode to Enum. In order to be consistent with the response from RP side, add suppression for DefinitionsPropertiesNamesCamelCase
1a06967
to
a22cf02
Compare
"cores_used": { | ||
"description": "The number of cores used in the subscription.", | ||
"type": "integer", | ||
"format": "int64" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would int32 make more sense size-wise?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would int32 make more sense size-wise?
No, server data type is long
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't envy someone with a over a 2 billion core bill 😆
…ionType to enum, this will bring breaking change in java sdk. Solution: remove the two enum, change it to string type
…pe to enum, this will bring breaking change in java sdk. Solution: remove the two enum, change it to string type (#6785)
[HDInsight]
Latest improvements:
MSFT employees can try out our new experience at OpenAPI Hub - one location for using our validation tools and finding your workflow.
Contribution checklist:
ARM API Review Checklist
Failure to comply may result in delays for manifest application. Note this does not apply to data plane APIs.
Please follow the link to find more details on API review process.