Skip to content
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

Swagger Regen Preview from TypeSpec built from 20240703.3 #29698

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions eng/scripts/TypeSpec-Generate-Swagger.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[CmdletBinding()]
param (
[switch]$CheckAll = $false,
[string]$BaseCommitish = "HEAD^",
[string]$TargetCommitish = "HEAD"
)

$typespecFolders = &"$PSScriptRoot/Get-TypeSpec-Folders.ps1" -BaseCommitish:$BaseCommitish -TargetCommitish:$TargetCommitish -CheckAll:$CheckAll
if ($typespecFolders) {
$typespecFolders = $typespecFolders.Split('',[System.StringSplitOptions]::RemoveEmptyEntries)
foreach ($typespecFolder in $typespecFolders) {
Push-Location $typespecFolder
npx tsp compile .
Pop-Location
}
} else {
if ($CheckAll) {
LogError "TypeSpec Generate Swagger - All did not generate any swaggers"
LogJobFailure
exit 1
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
"tags": [
"Fleets"
],
"description": "List Fleet resources by resource group",
"description": "A resource list operation, at the scope of the resource's parent",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter"
Expand Down Expand Up @@ -744,9 +744,14 @@
"userAssignedIdentities": {
"type": "object",
"description": "The identities assigned to this resource by the user.",
"x-nullable": true,
"additionalProperties": {
"$ref": "../../../../../common-types/resource-management/v5/managedidentity.json#/definitions/UserAssignedIdentity"
"allOf": [
{
"$ref": "../../../../../common-types/resource-management/v5/managedidentity.json#/definitions/UserAssignedIdentity"
}
],
"type": "object",
"x-nullable": true
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
"tags": [
"Fleets"
],
"description": "List Fleet resources by resource group",
"description": "A resource list operation, at the scope of the resource's parent",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter"
Expand Down Expand Up @@ -733,9 +733,14 @@
"userAssignedIdentities": {
"type": "object",
"description": "The identities assigned to this resource by the user.",
"x-nullable": true,
"additionalProperties": {
"$ref": "../../../../../common-types/resource-management/v5/managedidentity.json#/definitions/UserAssignedIdentity"
"allOf": [
{
"$ref": "../../../../../common-types/resource-management/v5/managedidentity.json#/definitions/UserAssignedIdentity"
}
],
"type": "object",
"x-nullable": true
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@
},
"/{resourceUri}/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default/guestAgents": {
"get": {
"operationId": "GuestAgents_ListByVirtualMachineInstance",
"operationId": "GuestAgents_List",
"tags": [
"GuestAgents"
],
Expand All @@ -399,11 +399,6 @@
}
}
},
"x-ms-examples": {
"GuestAgentListByVirtualMachineInstances": {
"$ref": "./examples/GuestAgents_ListByVirtualMachineInstance.json"
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
Expand Down Expand Up @@ -556,7 +551,7 @@
},
"/{resourceUri}/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default/hybridIdentityMetadata": {
"get": {
"operationId": "HybridIdentityMetadata_ListByVirtualMachineInstance",
"operationId": "HybridIdentityMetadata_List",
"tags": [
"HybridIdentityMetadataGroup"
],
Expand All @@ -583,11 +578,6 @@
}
}
},
"x-ms-examples": {
"HybridIdentityMetadataListByVirtualMachineInstances": {
"$ref": "./examples/HybridIdentityMetadata_ListByVirtualMachineInstance.json"
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
Expand Down Expand Up @@ -1180,7 +1170,7 @@
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/galleryImages": {
"get": {
"operationId": "GalleryImages_ListByResourceGroup",
"operationId": "GalleryImages_List",
"tags": [
"GalleryImages"
],
Expand Down Expand Up @@ -1210,11 +1200,6 @@
}
}
},
"x-ms-examples": {
"ListGalleryImageByResourceGroup": {
"$ref": "./examples/GalleryImages_ListByResourceGroup.json"
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
Expand Down Expand Up @@ -1472,7 +1457,7 @@
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/logicalNetworks": {
"get": {
"operationId": "LogicalNetworks_ListByResourceGroup",
"operationId": "LogicalNetworks_List",
"tags": [
"LogicalNetworks"
],
Expand Down Expand Up @@ -1502,11 +1487,6 @@
}
}
},
"x-ms-examples": {
"ListLogicalNetworkByResourceGroup": {
"$ref": "./examples/LogicalNetworks_ListByResourceGroup.json"
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
Expand Down Expand Up @@ -1764,7 +1744,7 @@
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/marketplaceGalleryImages": {
"get": {
"operationId": "MarketplaceGalleryImages_ListByResourceGroup",
"operationId": "MarketplaceGalleryImages_List",
"tags": [
"MarketplaceGalleryImages"
],
Expand Down Expand Up @@ -1794,11 +1774,6 @@
}
}
},
"x-ms-examples": {
"ListMarketplaceGalleryImageByResourceGroup": {
"$ref": "./examples/MarketplaceGalleryImages_ListByResourceGroup.json"
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
Expand Down Expand Up @@ -2056,7 +2031,7 @@
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/networkInterfaces": {
"get": {
"operationId": "NetworkInterfaces_ListByResourceGroup",
"operationId": "NetworkInterfaces_List",
"tags": [
"NetworkInterfaces"
],
Expand Down Expand Up @@ -2086,11 +2061,6 @@
}
}
},
"x-ms-examples": {
"ListNetworkInterfaceByResourceGroup": {
"$ref": "./examples/NetworkInterfaces_ListByResourceGroup.json"
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
Expand Down Expand Up @@ -2348,7 +2318,7 @@
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/networkSecurityGroups": {
"get": {
"operationId": "NetworkSecurityGroups_ListByResourceGroup",
"operationId": "NetworkSecurityGroups_List",
"tags": [
"NetworkSecurityGroups"
],
Expand Down Expand Up @@ -2378,11 +2348,6 @@
}
}
},
"x-ms-examples": {
"List network security groups in resource group": {
"$ref": "./examples/NetworkSecurityGroups_ListByResourceGroup.json"
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
Expand Down Expand Up @@ -2640,7 +2605,7 @@
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/networkSecurityGroups/{networkSecurityGroupName}/securityRules": {
"get": {
"operationId": "SecurityRules_ListByNetworkSecurityGroup",
"operationId": "SecurityRules_List",
"tags": [
"SecurityRules"
],
Expand Down Expand Up @@ -2678,11 +2643,6 @@
}
}
},
"x-ms-examples": {
"List network security rules in network security group": {
"$ref": "./examples/SecurityRules_ListByNetworkSecurityGroup.json"
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
Expand Down Expand Up @@ -2892,7 +2852,7 @@
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/storageContainers": {
"get": {
"operationId": "StorageContainers_ListByResourceGroup",
"operationId": "StorageContainers_List",
"tags": [
"StorageContainers"
],
Expand Down Expand Up @@ -2922,11 +2882,6 @@
}
}
},
"x-ms-examples": {
"ListStorageContainerByResourceGroup": {
"$ref": "./examples/StorageContainers_ListByResourceGroup.json"
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
Expand Down Expand Up @@ -3184,7 +3139,7 @@
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualHardDisks": {
"get": {
"operationId": "VirtualHardDisks_ListByResourceGroup",
"operationId": "VirtualHardDisks_List",
"tags": [
"VirtualHardDisks"
],
Expand Down Expand Up @@ -3214,11 +3169,6 @@
}
}
},
"x-ms-examples": {
"ListVirtualHardDiskByResourceGroup": {
"$ref": "./examples/VirtualHardDisks_ListByResourceGroup.json"
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
"tags": [
"CommunityTrainings"
],
"description": "List CommunityTraining resources by resource group",
"description": "A resource list operation, at the scope of the resource's parent",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -493,11 +493,11 @@
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members": {
"get": {
"operationId": "FleetMembers_ListByFleet",
"operationId": "FleetMembers_ListByParent",
"tags": [
"FleetMembers"
],
"description": "List FleetMember resources by Fleet",
"description": "A resource list operation, at the scope of the resource's parent",
"parameters": [
{
"$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter"
Expand Down Expand Up @@ -533,11 +533,6 @@
}
}
},
"x-ms-examples": {
"Lists the members of a Fleet.": {
"$ref": "./examples/FleetMembers_List.json"
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -496,11 +496,11 @@
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/members": {
"get": {
"operationId": "FleetMembers_ListByFleet",
"operationId": "FleetMembers_ListByParent",
"tags": [
"FleetMembers"
],
"description": "List FleetMember resources by Fleet",
"description": "A resource list operation, at the scope of the resource's parent",
"parameters": [
{
"$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter"
Expand Down Expand Up @@ -536,11 +536,6 @@
}
}
},
"x-ms-examples": {
"Lists the members of a Fleet.": {
"$ref": "./examples/FleetMembers_ListByFleet.json"
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
Expand Down Expand Up @@ -863,11 +858,11 @@
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns": {
"get": {
"operationId": "UpdateRuns_ListByFleet",
"operationId": "UpdateRuns_ListByParent",
"tags": [
"UpdateRuns"
],
"description": "List UpdateRun resources by Fleet",
"description": "A resource list operation, at the scope of the resource's parent",
"parameters": [
{
"$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter"
Expand Down Expand Up @@ -903,11 +898,6 @@
}
}
},
"x-ms-examples": {
"Lists the UpdateRun resources by fleet.": {
"$ref": "./examples/UpdateRuns_ListByFleet.json"
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
Expand Down
Loading
Loading