[Search] Add client names for ResetSkills and ResetDocs#16222
Conversation
|
Hi, @Mohit-Chakraborty Thanks for your PR. I am workflow bot for review process. Here are some small tips. Any feedback about review process or workflow bot, pls contact swagger and tools team. vsswagger@microsoft.com |
Swagger Validation Report
|
| Rule | Message |
|---|---|
| The new version has a different type 'object' than the previous one ''. New: Azure.Search/preview/2021-04-30-Preview/searchservice.json#L1064:13 Old: Azure.Search/preview/2021-04-30-Preview/searchservice.json#L1063:13 |
️⚠️LintDiff: 0 Warnings warning [Detail]
- Linted configuring files (Based on source branch, openapi-validator v1.10.1 , classic-openapi-validator v1.1.10 )
- Linted configuring files (Based on target branch, openapi-validator v1.10.1 , classic-openapi-validator v1.1.10 )
| Rule | Message |
|---|---|
| The operation 'Indexers_Run' returns 202 status code, which indicates a long running operation, please enable 'x-ms-long-running-operation. Location: Azure.Search/preview/2021-04-30-Preview/searchservice.json#L413 |
|
| 'keysOrIds' parameter lacks 'description' property. Consider adding a 'description' element. Accurate description is essential for maintaining reference documentation. Location: Azure.Search/preview/2021-04-30-Preview/searchservice.json#L358 |
️️✔️Avocado succeeded [Detail] [Expand]
Validation passes for Avocado.
️️✔️ModelValidation succeeded [Detail] [Expand]
Validation passes for ModelValidation.
️️✔️SemanticValidation succeeded [Detail] [Expand]
Validation passes for SemanticValidation.
️️✔️Cross-Version Breaking Changes succeeded [Detail] [Expand]
There are no breaking changes.
️️✔️CredScan succeeded [Detail] [Expand]
There is no credential detected.
️️✔️[Staging] SDK Track2 Validation succeeded [Detail] [Expand]
Validation passes for SDKTrack2Validation
- The following tags are being changed in this PR
️️✔️[Staging] PrettierCheck succeeded [Detail] [Expand]
Validation passes for PrettierCheck.
️️✔️[Staging] SpellCheck succeeded [Detail] [Expand]
Validation passes for SpellCheck.
️️✔️[Staging] Lint(RPaaS) succeeded [Detail] [Expand]
Validation passes for Lint(RPaaS).
|
[Call for Action] To better understand Azure service dev/test scenario, and support Azure service developer better on Swagger and REST API related tests in early phase, please help to fill in with this survey https://aka.ms/SurveyForEarlyPhase. It will take 5 to 10 minutes. If you already complete survey, please neglect this comment. Thanks. |
Swagger Generation Artifacts
|
|
Hi @Mohit-Chakraborty, Your PR has some issues. Please fix the CI sequentially by following the order of
|
| @@ -1061,6 +1062,8 @@ | |||
| "in": "body", | |||
| "required": true, | |||
| "schema": { | |||
There was a problem hiding this comment.
Still not happy with this part.
This generates a class with an IList as its only property -
public partial class SkillNames
{
/// <summary> Initializes a new instance of SkillNames. </summary>
public SkillNames()
{
SkillNamesValue = new ChangeTrackingList<string>();
}
/// <summary> the names of skills to be reset. </summary>
public IList<string> SkillNamesValue { get; }
}
Looking for ways to have this parameter as a list itself. Can we do that without breaking the service protocol?
There was a problem hiding this comment.
I agree it doesn't seem to warrant its own type. @shuyangmsft ?
There was a problem hiding this comment.
@Mohit-Chakraborty If you want to add skillNames as a parameter directly. You can add skillNames parameter like-
{
"name": "skillNames",
"in": "body",
"required": true,
"schema": {
"type": "array",
"items": {
"type": "string"
}
},
"description": "The names of skills to reset."
}
There was a problem hiding this comment.
Thanks @ShivangiReja. Do you know if this will be a breaking change for the service?
There was a problem hiding this comment.
| ❌ 1033 - RemovedProperty | The new version is missing a property found in the old version. Was 'skillNames' renamed or removed?Old: Azure.Search/preview/2021-04-30-Preview/searchservice.json#L1064:15 |
|---|
Validation tells me this is a breaking change.
There was a problem hiding this comment.
So, we should probably make this change in the client to make things look better.
There was a problem hiding this comment.
It looks like a breaking change, since previously user was passing the object type in the method and now with this change user will have to pass the list.
There was a problem hiding this comment.
I reverted the change.
There was a problem hiding this comment.
I still have an error -
| ❌ INVALID_TYPE | Expected type object but found type arrayUrl: Azure.Search/preview/2021-04-30-Preview/searchservice.json#L1064 |
|---|
There was a problem hiding this comment.
Finally managed to fix all validation errors. The above error was due to a discrepancy between the spec and the example for the ResetSkills operation. I updated the example to follow the design of the spec.
|
Hi @Mohit-Chakraborty, one or multiple breaking change(s) is detected in your PR. Please check out the breaking change(s), and provide business justification in the PR comment and @ PR assignee why you must have these change(s), and how external customer impact can be mitigated. Please ensure to follow breaking change policy to request breaking change review and approval before proceeding swagger PR review. |
|
cc: @tg-msft |
… property" This reverts commit 439d1ae.
|
@anuchandy, @lmazuel can we merge this PR please. |
* Add client names for ResetSkills and ResetDocs * Make 'skillNames' a list of items and not a class with a list property * Revert "Make 'skillNames' a list of items and not a class with a list property" This reverts commit 439d1ae. * Remove outer 'description' property * Revert "Remove outer 'description' property" This reverts commit f2896cd. * Try to fix the example as per the spec
* Add client names for ResetSkills and ResetDocs * Make 'skillNames' a list of items and not a class with a list property * Revert "Make 'skillNames' a list of items and not a class with a list property" This reverts commit 439d1ae. * Remove outer 'description' property * Revert "Remove outer 'description' property" This reverts commit f2896cd. * Try to fix the example as per the spec
Without any name provided in the spec, CodeGen sets names like "Paths1Ju2XepSkillsetsSkillsetnameSearchResetskillsPostRequestbodyContentApplicationJsonSchema" and "Paths1Cj7DxmIndexersIndexernameSearchResetdocsPostRequestbodyContentApplicationJsonSchema"