-
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
Add Swagger for Short Term Retention Policies #2860
Conversation
Automation for azure-sdk-for-pythonThe initial PR has been merged into your service PR: |
Automation for azure-libraries-for-javaThe initial PR has been merged into your service PR: |
Automation for azure-sdk-for-goThe initial PR has been merged into your service PR: |
Automation for azure-sdk-for-nodeThe initial PR has been merged into your service PR: |
"name": "ShortTermRetentionPolicyName", | ||
"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.
Seems policyName
is used in most of the operations, should we move this to parameter section?
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.
Could you expand on what the benefit to that would be?
policyName will always be "default". I'd like to keep it consistent with what we see in Long Term Retention
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.
The benefit would be the same that we get from having a common definition of resource group name or subscription parameter. Out of 8 operations in this swagger, 6 of them uses policyName param, if you centralize this definition then swagger looks more clean, less lines and is a good pattern to follow in general.
In Long Term Rentetion swagger, out of 8 only two uses policyName, so when reviewed it I didn't ask to move definition as it was not saving much.
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.
had an offline chat with @dealaus, swagger is not manually authored, SQL team will discuss internally to see whether this can be accommodated in the swagger gen tool. For now this is not a must fix for this PR.
@dealaus - you added If (1) is the case then please let me know once it's ready for review, since this is a new swagger we need to get this reviewed from ARM. If (2) is the case then it will be helpful to have a approximate date when it is ready for consumption. |
@anuchandy it is (2) in this case. Enabling the API is in deployment pipeline right now and has hit some regions (estimated to be WW on 4/20), but the ARM manifest has not been updated with these new APIs. |
@dealaus thanks for providing date. Given swagger is ready, i will request ARM review. |
@ravbhatnagar new swagger, please review |
@jaredmoo it will be very helpful in case you can have a quick look. |
"$ref": "#/parameters/ServerNameParameter" | ||
}, | ||
{ | ||
"name": "restorableDroppedDatabaseId", |
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.
Is this a GUID or a name? Also could use a description.
"RestorableDroppedDatabaseShortTermRetentionPolicies" | ||
], | ||
"description": "Gets a dropped database's short term retention policy.", | ||
"operationId": "RestorableDroppedDatabaseShortTermRetentionPolicies_Get", |
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.
RestorableDroppedDatabaseShortTermRetentionPolicies_Get means the operation in .NET will be client.RestorableDroppedDatabaseShortTermRetentionPolicies.CreateOrUpdate()... is there any way you can see to shorten that?
"RestorableDroppedDatabaseShortTermRetentionPolicies" | ||
], | ||
"description": "Sets a database's long term retention policy.", | ||
"operationId": "RestorableDroppedDatabaseShortTermRetentionPolicies_CreateOrUpdate", |
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.
Same comments as Get
"RestorableDroppedDatabaseShortTermRetentionPolicies" | ||
], | ||
"description": "Sets a database's long term retention policy.", | ||
"operationId": "RestorableDroppedDatabaseShortTermRetentionPolicies_Update", |
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.
Same comment as Get
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.
Just one comment. Please fix. Good to merge after this one fix.
"200": { | ||
"description": "Successfully retrieved the policy.", | ||
"schema": { | ||
"$ref": "#/definitions/ShortTermRetentionPolicy" |
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 list API and the response should be a "value" array. Check other API specs for example.
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.
Ok, I will remove from this checkin for now until we can fix the API to return an array. Shouldn't be a problem, it will just take ~14 days to be deployed.
Just one issue needs to be fixed. Conditionally signed off. |
@dealaus can you fix the readme.md conflict? |
@anuchandy done. |
Hi There, I am the AutoRest Linter Azure bot. I am here to help. My task is to analyze the situation from the AutoRest linter perspective. Please review the below analysis result: File: AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback Thanks for your co-operation. |
Hi There, I am the AutoRest Linter Azure bot. I am here to help. My task is to analyze the situation from the AutoRest linter perspective. Please review the below analysis result: File: AutoRest Linter Guidelines | AutoRest Linter Issues | Send feedback Thanks for your co-operation. |
cleanup old pipelines for RPSaaSMaster
This change adds the swagger documentation for the Short Term Retention feature along with examples for each of the APIs. This includes the following APIs:
Get database short term retention policy
Update database short term retention policy
PR information
api-version
in the path should match theapi-version
in the spec).Quality of Swagger