Skip to content

Commit 2e2f878

Browse files
Fix Issues with Swagger for Microsoft.Help RP (#23690)
* update sdk namespaces for all languages except c# * fix issues with swagger * update examples of solution metadata
1 parent a67a24b commit 2e2f878

File tree

2 files changed

+63
-32
lines changed

2 files changed

+63
-32
lines changed

specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/examples/ListDiscoverySolutionsForKeyVaultResource.json

Lines changed: 37 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,34 +8,49 @@
88
"body": {
99
"value": [
1010
{
11-
"solutionId": "SampleSolutionId1",
12-
"solutionType": "Diagnostics",
13-
"description": "This is a diagnostic",
14-
"requiredParameterSets": [
15-
[
16-
"ResourceUri"
11+
"id": "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read/providers/Microsoft.Help/discoverySolutions/SampleSolutionId1",
12+
"type": "Microsoft.Help/discoverySolutions",
13+
"name": "SampleSolutionId1",
14+
"properties": {
15+
"solutionId": "SampleSolutionId1",
16+
"solutionType": "Diagnostics",
17+
"description": "This is a diagnostic",
18+
"requiredParameterSets": [
19+
[
20+
"ResourceUri"
21+
]
1722
]
18-
]
23+
}
1924
},
2025
{
21-
"solutionId": "SampleSolutionId2",
22-
"solutionType": "Diagnostics",
23-
"description": "This is another diagnostic",
24-
"requiredParameterSets": [
25-
[
26-
"ResourceUri"
26+
"id": "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read/providers/Microsoft.Help/discoverySolutions/SampleSolutionId2",
27+
"type": "Microsoft.Help/discoverySolutions",
28+
"name": "SampleSolutionId2",
29+
"properties": {
30+
"solutionId": "SampleSolutionId2",
31+
"solutionType": "Diagnostics",
32+
"description": "This is a diagnostic",
33+
"requiredParameterSets": [
34+
[
35+
"ResourceUri"
36+
]
2737
]
28-
]
38+
}
2939
},
3040
{
31-
"solutionId": "SampleSolutionId3",
32-
"solutionType": "Diagnostics",
33-
"description": "This is another testing diagnostic"
34-
},
35-
{
36-
"solutionId": "SampleSolutionId4",
37-
"solutionType": "Diagnostics",
38-
"description": "This is also another testing diagnostic"
41+
"id": "subscriptions/0d0fcd2e-c4fd-4349-8497-200edb3923c6/resourcegroups/myresourceGroup/providers/Microsoft.KeyVault/vaults/test-keyvault-non-read/providers/Microsoft.Help/discoverySolutions/SampleSolutionId3",
42+
"type": "Microsoft.Help/discoverySolutions",
43+
"name": "SampleSolutionId3",
44+
"properties": {
45+
"solutionId": "SampleSolutionId3",
46+
"solutionType": "Diagnostics",
47+
"description": "This is a diagnostic",
48+
"requiredParameterSets": [
49+
[
50+
"ResourceUri"
51+
]
52+
]
53+
}
3954
}
4055
],
4156
"nextLink": "nextLinkUrl"

specification/help/resource-manager/Microsoft.Help/preview/2023-01-01-preview/help.json

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -523,19 +523,33 @@
523523
"description": "The list of solution metadata.",
524524
"type": "array",
525525
"items": {
526-
"$ref": "#/definitions/SolutionMetadata"
527-
},
528-
"x-ms-identifiers": [
529-
"solutionId"
530-
]
526+
"$ref": "#/definitions/SolutionMetadataResource"
527+
}
531528
},
532529
"nextLink": {
533530
"description": "The link used to get the next page of solution metadata.",
534531
"type": "string"
535532
}
536533
}
537534
},
538-
"SolutionMetadata": {
535+
"SolutionMetadataResource": {
536+
"description": "Solution Metadata resource",
537+
"type": "object",
538+
"x-ms-azure-resource": true,
539+
"properties": {
540+
"properties": {
541+
"x-ms-client-flatten": true,
542+
"$ref": "#/definitions/SolutionMetadataProperties",
543+
"description": "Solution metadata Resource properties."
544+
}
545+
},
546+
"allOf": [
547+
{
548+
"$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource"
549+
}
550+
]
551+
},
552+
"SolutionMetadataProperties": {
539553
"description": "Diagnostic solution metadata.",
540554
"type": "object",
541555
"properties": {
@@ -573,7 +587,7 @@
573587
"required": true,
574588
"type": "string",
575589
"description": "This is an extension resource provider and only resource level extension is supported at the moment.",
576-
"x-ms-parameter-location": "client",
590+
"x-ms-parameter-location": "method",
577591
"x-ms-skip-url-encoding": true
578592
},
579593
"ApiVersionParameter": {
@@ -593,22 +607,24 @@
593607
"maxLength": 100,
594608
"pattern": "^[A-Za-z0-9-+@()_]+$",
595609
"description": "Unique resource name for insight resources",
596-
"x-ms-parameter-location": "client"
610+
"x-ms-parameter-location": "method"
597611
},
598612
"FilterParameter": {
599613
"name": "$filter",
600614
"description": "Can be used to filter solutionIds by 'ProblemClassificationId'. The filter supports only 'and' and 'eq' operators. Example: $filter=ProblemClassificationId eq '1ddda5b4-cf6c-4d4f-91ad-bc38ab0e811e' and ProblemClassificationId eq '0a9673c2-7af6-4e19-90d3-4ee2461076d9'.",
601615
"in": "query",
602616
"required": false,
603617
"type": "string",
604-
"x-ms-skip-url-encoding": true
618+
"x-ms-skip-url-encoding": true,
619+
"x-ms-parameter-location": "method"
605620
},
606621
"SkipTokenParameter": {
607622
"name": "$skiptoken",
608623
"description": "Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.",
609624
"in": "query",
610625
"required": false,
611-
"type": "string"
626+
"type": "string",
627+
"x-ms-parameter-location": "method"
612628
}
613629
}
614630
}

0 commit comments

Comments
 (0)