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

Alecb typespecmigration 20240808-preview #31722

Open
wants to merge 174 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 53 commits
Commits
Show all changes
174 commits
Select commit Hold shift + click to select a range
08e2271
Copy files from stable/2024-04-03
alec-baird Sep 12, 2024
eb7c473
Update version to stable/2024-09-10
alec-baird Sep 12, 2024
71564ae
Added tag for 2024-09-10 in readme file
alec-baird Sep 12, 2024
a0496fe
Updated examples
alec-baird Sep 12, 2024
5f5b47c
removed bad line
alec-baird Sep 12, 2024
34c44f6
put properties in correct brackets
alec-baird Sep 12, 2024
4fe42df
Ran prettier
alec-baird Sep 12, 2024
43eb35c
Ran prettier on all examples (LF to CRLF issue?)
alec-baird Sep 12, 2024
b53d368
Merge branch 'main' into alecb-stable20240910-desktopvirtualization
alec-baird Sep 12, 2024
7e3049c
Merge branch 'main' into alecb-stable20240910-desktopvirtualization
alec-baird Oct 16, 2024
74e72fa
merged main into branch
alec-baird Nov 19, 2024
931be43
Ran generate typespec
alec-baird Nov 19, 2024
87ba05f
Followed standard folder convention, added few missing ; to HP
alec-baird Nov 19, 2024
01cba5c
added import to fix clientName decorator
alec-baird Nov 19, 2024
45b2de1
changed import to importAppAtachInfo to avoid keyword usage
alec-baird Nov 19, 2024
c13e2df
began correcting typespec with privateEndpointConnection
alec-baird Nov 19, 2024
ef08994
Compiled successfully first time, added additional model for Workspac…
alec-baird Nov 21, 2024
f39abd7
Fixed 90+ warnings
alec-baird Nov 26, 2024
3e89431
Added last simple warnings
alec-baird Nov 26, 2024
c85af0d
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
alec-baird Dec 3, 2024
2e3f1aa
Copied package-lock
alec-baird Dec 3, 2024
4719de0
Added x-ms-identifiers on complex objects
alec-baird Dec 4, 2024
fd26c0e
Added LegacyOperations for PrivateEndpointConnections
alec-baird Dec 5, 2024
2b90547
Added alias for ResourceTypeParameter
alec-baird Dec 6, 2024
403b670
Fixed Legacy Operations to fully compile
alec-baird Dec 9, 2024
02e75aa
Tags removed from patch properties
alec-baird Dec 10, 2024
a5128f5
Added suppression to Record, ProvisioningState, and CasingStyle warni…
alec-baird Dec 11, 2024
5499b23
Fixed lintDiff errors
alec-baird Dec 11, 2024
fcfd92c
Added package changes to use latest version of rest-api-diff wihch is…
alec-baird Dec 11, 2024
60ea7a6
Merge branch 'main' into alecb-typespecmigration-20240910
alec-baird Dec 11, 2024
1e17697
Revert "Added package changes to use latest version of rest-api-diff …
alec-baird Dec 11, 2024
e4b8ece
FIXME removed
alec-baird Dec 11, 2024
a588401
Fixed package-lock to be same as before
alec-baird Dec 11, 2024
3599c15
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
alec-baird Dec 11, 2024
c5a6c50
Added old swagger for diff and sorted
alec-baird Dec 11, 2024
7363ea2
REVERT NEEDED: These changes created locally vars and updated commont…
alec-baird Dec 12, 2024
832d8a4
enamed to old for convienence
alec-baird Dec 12, 2024
caae5d0
Added fixes for 200 responses
alec-baird Jan 9, 2025
da2b276
diff mitigations
alec-baird Jan 10, 2025
696067c
Fixed PATCH compile failures
alec-baird Jan 10, 2025
387f52c
Updated interfaces to get correct Op IDs
alec-baird Jan 14, 2025
f108a16
Renamed privateEndpoint interfaces
alec-baird Jan 14, 2025
50a32d0
spell check/prettier failures
alec-baird Jan 14, 2025
0a8b030
fixed pascal casing on MSIX
alec-baird Jan 14, 2025
b067225
Ran prettier on directory
alec-baird Jan 14, 2025
1af2b6c
Updated ignored wordlist on cspell for desktopvirtualization
alec-baird Jan 14, 2025
7754e3a
Merge branch 'main' into alecb-typespecmigration-20240910
alec-baird Jan 14, 2025
1f52b93
more spell check suppressions
alec-baird Jan 14, 2025
60fe0e8
Merge branch 'alecb-typespecmigration-20240910' of https://github.com…
alec-baird Jan 14, 2025
261cf6e
Fixed PrivateEndpointConnection
alec-baird Jan 14, 2025
3f04348
updated client.tsp reference to PL
alec-baird Jan 14, 2025
147afd5
AppAttachPackage breaking changes
alec-baird Jan 15, 2025
9e74b29
Added MSIX Package path
alec-baird Jan 15, 2025
cea5d94
Updated Breaking Change Paths
alec-baird Jan 15, 2025
11f779c
Fixed msix packages endpoint path
alec-baird Jan 16, 2025
19432cf
Merge branch 'main' into alecb-typespecmigration-20240910
alec-baird Jan 16, 2025
ae47b7a
Changed from SubscriptionBase to ResourceGroupBaseParameters
alec-baird Jan 16, 2025
586c488
Merge branch 'alecb-typespecmigration-20240910' of https://github.com…
alec-baird Jan 16, 2025
3aeb357
Changed Msix to MSIX
alec-baird Jan 16, 2025
8bf5aef
Resolved incorrect AppAttachPackageInfo Op ID
alec-baird Jan 16, 2025
559bda5
Corrected last Operation IDs
alec-baird Jan 16, 2025
989dce7
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
alec-baird Jan 16, 2025
6bc6832
Converted eTag to etag
alec-baird Jan 16, 2025
803bde3
added clientName and workspace endpoints
alec-baird Jan 16, 2025
9492517
Fixed last of removedPaths, fixed EnumDefaults
alec-baird Jan 16, 2025
fb8cb81
caught last etag
alec-baird Jan 16, 2025
8235fc2
Updated property to match old naming conventions
alec-baird Jan 17, 2025
861d212
Added minimums that were missing
alec-baird Jan 17, 2025
f3debbd
Added more minimums
alec-baird Jan 17, 2025
17bf986
Added handling for userSession endpoints
alec-baird Jan 17, 2025
7aedfc2
Added PrivateLinkResources for workspace List
alec-baird Jan 17, 2025
b491792
Removed files I used to help conversion process
alec-baird Jan 17, 2025
09ae929
Revert "Removed files I used to help conversion process"
alec-baird Jan 17, 2025
3938893
Fixed casing for segment
alec-baird Jan 17, 2025
39d9bb1
Removed old comparison
alec-baird Jan 17, 2025
28ddf58
Revert "Removed old comparison"
alec-baird Jan 22, 2025
1d002b7
changed from stable to preview
alec-baird Jan 22, 2025
c16bcfd
Missed preview in path
alec-baird Jan 22, 2025
b24e1ba
changed version to 2024-08-08-preview
alec-baird Feb 1, 2025
2109933
Updated folder name
alec-baird Feb 1, 2025
af6f922
updated folder, ran compilation
alec-baird Feb 1, 2025
bdb3f03
Updated readme, removed extra preview
alec-baird Feb 1, 2025
60286f6
Added ActiveSessionHostConfiguration to Typespec
alec-baird Feb 1, 2025
6b31ca3
added default
alec-baird Feb 1, 2025
f9a04bf
Few Breaking Change fixes
alec-baird Feb 1, 2025
5f273d2
Added half of SessionHostManagement
alec-baird Feb 3, 2025
4dac20b
Copied examples over
alec-baird Feb 3, 2025
490903f
Added MaxLength to friendlyName
alec-baird Feb 3, 2025
ca64d9c
Revert "Copied examples over"
alec-baird Feb 3, 2025
d73e3b8
Changed rampup mins to 0
alec-baird Feb 3, 2025
2bd529c
rest of scaling values standardized
alec-baird Feb 3, 2025
a063718
added missing AppAttachPackage properites, MultiplePersistent fix
alec-baird Feb 3, 2025
e289b09
Removed some requireds
alec-baird Feb 3, 2025
db328e6
added a few defaults, added personal enum missing
alec-baird Feb 4, 2025
6527e07
removed bad default
alec-baird Feb 4, 2025
65bceb7
added non requires
alec-baird Feb 4, 2025
b505af3
Added clientName to fix required parameters
alec-baird Feb 4, 2025
94b22d1
few more clientNames
alec-baird Feb 4, 2025
543b916
ran compile to get changes in swagger
alec-baird Feb 4, 2025
8c50c54
Added few more clientNames
alec-baird Feb 4, 2025
6daacf1
2 clientName fixes
alec-baird Feb 4, 2025
f07a69f
Last clientNames
alec-baird Feb 4, 2025
3625de1
Added nullables to make them not required
alec-baird Feb 4, 2025
e32b047
Updated pattern, URI and ARMID format, and singleton for active SHC
alec-baird Feb 5, 2025
1e14294
Added sessionHostConfigurations, getting errors with duplicateTypeNames
alec-baird Feb 5, 2025
8836d0e
Added url type instead of resourceIdentifier
alec-baird Feb 6, 2025
4e86fe2
Added sessionHostUpdateStatuses endpoint path
alec-baird Feb 6, 2025
610164c
added initiate sessionHostUpdate endpoint
alec-baird Feb 6, 2025
cd3c845
Added Failing LRO code to repo to help debug
alec-baird Feb 6, 2025
95d36ca
Added NoResponse Op to Async Control call
alec-baird Feb 7, 2025
ab924df
Added overrides for MSIX package OpIds
alec-baird Feb 7, 2025
94d3363
Added last 2 missing paths
alec-baird Feb 7, 2025
2a5fef9
Fixed last 2 required parameters with clientName
alec-baird Feb 7, 2025
176a06c
Added SHC createOrUpdate op
alec-baird Feb 7, 2025
0cdd379
Fixed OpId and clientName
alec-baird Feb 7, 2025
73c8c3f
replace record with string array
alec-baird Feb 7, 2025
5fa0261
ran compile
alec-baird Feb 7, 2025
880000f
removed action from segement
alec-baird Feb 7, 2025
c98255b
changed to v6
alec-baird Feb 8, 2025
d6a140d
Made Patch properties in SessionHostConfiguration not required
alec-baird Feb 8, 2025
e64d9c1
Made PATCH properties optional
alec-baird Feb 8, 2025
efc8cd1
Added more patch nullables
alec-baird Feb 8, 2025
b252e5a
compiled
alec-baird Feb 8, 2025
7ee7082
Added examples from old directory
alec-baird Feb 8, 2025
0c8acbb
added a few OpId and Title to examples
alec-baird Feb 8, 2025
129b8a6
Added more to examples
alec-baird Feb 8, 2025
fe89b03
added more examples
alec-baird Feb 8, 2025
40228f0
Cleaned up dupe examples
alec-baird Feb 8, 2025
3c6526b
Added OpIds and title to each example
alec-baird Feb 8, 2025
1c40d95
Updated API version
alec-baird Feb 8, 2025
585d1af
Ran tsp commit
alec-baird Feb 8, 2025
15a390c
Fixed examples plural issue (most of them, I probably missed a few)
alec-baird Feb 8, 2025
e6ee65f
ModelValidation fixes
alec-baird Feb 8, 2025
71defc2
BreakingChange fixes after second review
alec-baird Feb 8, 2025
07ceb45
More Breaking Change fixes, LRO
alec-baird Feb 8, 2025
1dbc078
More BreakingChange fixes
alec-baird Feb 8, 2025
1d7c7c2
minor fixes
alec-baird Feb 8, 2025
6a722ee
Added 2 small missing feature additions
alec-baird Feb 8, 2025
d2e137f
Removed armID from secGroupID
alec-baird Feb 8, 2025
264b508
Fixed SessionHostManagementUpdateStatus to use OperationStatusResult
alec-baird Feb 10, 2025
3145754
Fixed last removed properties
alec-baird Feb 10, 2025
b5f6d66
Removed envelope properties from Proxy Resources, various small fixes
alec-baird Feb 10, 2025
cd90af1
Removed a couple readonlyprops
alec-baird Feb 10, 2025
481c767
PrivateLink Tracked to Proxy
alec-baird Feb 10, 2025
d72b9de
Fixed SessionHostManagementUpdateStatus
alec-baird Feb 11, 2025
a6b273b
Added clientNames to help with AddedRequiredParameter
alec-baird Feb 11, 2025
470fa93
clientNames
alec-baird Feb 11, 2025
e5ff98f
4 of last 6 clientNames
alec-baird Feb 11, 2025
4b4a82e
last addedrequiredproperty failures
alec-baird Feb 11, 2025
34f7c15
Fix
alec-baird Feb 11, 2025
d4af17c
added optional parameters
alec-baird Feb 11, 2025
b30611e
Renamed few enums for xmsenum check
alec-baird Feb 11, 2025
12fa179
DiskType -> VirtualMachineDiskType
alec-baird Feb 11, 2025
ffb1c99
2 of last 4 enum changes
alec-baird Feb 11, 2025
26caf7f
Moved on to model validations, fixed 20
alec-baird Feb 11, 2025
bc181c4
Update scaling to use ScalingScheduleDayOfWeekItem
alec-baird Feb 11, 2025
f02c840
Renamed to daysofweek array
alec-baird Feb 12, 2025
5eba40f
model
alec-baird Feb 12, 2025
ec7914e
model validation renames
alec-baird Feb 12, 2025
8050598
AppAttachPackagePatch fix
alec-baird Feb 12, 2025
3946f94
last model validation bunch
alec-baird Feb 12, 2025
c20489b
Added operations List example
alec-baird Feb 12, 2025
1c8cc06
Updated Maintenance to use model as false enums
alec-baird Feb 12, 2025
5644af1
Added small reference changes (casing, plural, ec)
alec-baird Feb 19, 2025
c8e8a97
Fixed OperationStatus
alec-baird Feb 19, 2025
857dc0b
Removed ResourceId from UpdateStatus
alec-baird Feb 19, 2025
8730526
Fixed miss optional param on read only
alec-baird Feb 19, 2025
8fb1015
Custom Operations
alec-baird Feb 19, 2025
e456bd5
Switched to using commonTypes resource
alec-baird Feb 19, 2025
32fabeb
Removed bad DaysOfWeek enum (this will add some false breaking change…
alec-baird Feb 20, 2025
42c22a1
Updated to use different patch that allows an empty body, few optiona…
alec-baird Feb 21, 2025
2386488
Used Request instead of response
alec-baird Feb 21, 2025
646c8c7
More Request changes
alec-baird Feb 21, 2025
852f93c
Last model validation fixes
alec-baird Feb 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
LHS= C:/Repos/AVD-RDDAM/avd-rest-api-specs/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-09-10-old C:\Repos\AVD-RDDAM\avd-rest-api-specs\specification\common-types\resource-management\v5\privatelinks.json C:\Repos\AVD-RDDAM\avd-rest-api-specs\specification\common-types\resource-management\v5\types.json
RHS= C:/Repos/AVD-RDDAM/avd-rest-api-specs/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-09-10 C:\Repos\AVD-RDDAM\avd-rest-api-specs\specification\common-types\resource-management\v5\types.json C:\Repos\AVD-RDDAM\avd-rest-api-specs\specification\common-types\resource-management\v5\privatelinks.json
COMPILE_TSP="true"
GROUP_VIOLATIONS="true"
TYPESPEC_COMPILER_PATH="C:/Repos/AVD-RDDAM/avd-rest-api-specs/node_modules/@typespec/compiler"
VERBOSE="true"
65 changes: 37 additions & 28 deletions cSpell.json
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,12 @@
]
},
{
"filename": "**/specification/billing/**/*.json",
"words": [
"mosp",
"resellee",
"cnpj"
]
"filename": "**/specification/billing/**/*.json",
"words": [
"mosp",
"resellee",
"cnpj"
]
},
{
"filename": "**/specification/compute/resource-manager/Microsoft.ContainerService/preview/2015-11-01-preview/containerService.json",
Expand Down Expand Up @@ -339,32 +339,32 @@
"freemium"
]
},
{
{
"filename": "**/specification/sql/resource-manager/Microsoft.Sql/preview/**/ManagedInstances.json",
"words": [
"freemium"
]
},
{
{
"filename": "**/specification/sql/resource-manager/Microsoft.Sql/preview/**/ServerTrustCertificates.json",
"words": [
"freemium"
]
},
{
{
"filename": "**/specification/sql/resource-manager/Microsoft.Sql/preview/**/ManagedInstanceDtcs.json",
"words": [
"msdtcdns",
"msdtc's"
]
},
{
{
"filename": "**/specification/sql/resource-manager/Microsoft.Sql/preview/**/TimeZones.json",
"words": [
"freemium"
]
},
{
{
"filename": "**/specification/sql/resource-manager/Microsoft.Sql/preview/**/ElasticPools.json",
"words": [
"PRMS"
Expand Down Expand Up @@ -1672,19 +1672,19 @@
"filename": "**/specification/ai/data-plane/HealthInsights/stable/**/openapi.json",
"words": [
"Acrad",
"acrad",
"BIRADS",
"mednax",
"frax",
"extracolonic",
"ascvd",
"tyrer",
"cusick",
"agatston",
"ceus",
"HNPCC",
"kellgren",
"tonnis"
"acrad",
"BIRADS",
"mednax",
"frax",
"extracolonic",
"ascvd",
"tyrer",
"cusick",
"agatston",
"ceus",
"HNPCC",
"kellgren",
"tonnis"
]
},
{
Expand Down Expand Up @@ -1753,7 +1753,7 @@
"words": [
"symboliclink",
"hardlink"
]
]
},
{
"filename": "**/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-09-01/costmanagement.pricesheets.json",
Expand All @@ -1765,10 +1765,10 @@
"filename": "**/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2023-11-01/costmanagement.pricesheets.json",
"words": [
"Unitof"
]
]
},
{
"filename": "**/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCIVM/**/*.json",
"filename": "**/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCIVM/**/*.json",
"words": [
"SEVSNP"
]
Expand Down Expand Up @@ -1810,13 +1810,22 @@
"words": [
"standbypool"
]
},
{
"filename": "**/specification/desktopvirtualization/*",
"words": [
"desktopvirtualization",
"applicationgroup",
"Applicationgroup",
"deregistration"
]
}
],
"enableFiletypes": [
"cadl"
],
"ignoreWords": [
"RDDAM",
"trafficcontrollerspec"
]

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
import "@typespec/openapi";
import "@typespec/rest";
import "./models.tsp";

using TypeSpec.Rest;
using Azure.ResourceManager;
using TypeSpec.Http;
using TypeSpec.OpenAPI;

namespace Microsoft.DesktopVirtualization;
/**
* Schema for App Attach Package properties.
*/
model AppAttachPackage
is Azure.ResourceManager.TrackedResource<AppAttachPackageProperties, false> {
...ResourceNameParameter<
Resource = AppAttachPackage,
KeyName = "appAttachPackageName",
SegmentName = "appAttachPackages",
NamePattern = "^[a-z0-9]([a-z0-9]|(-(?!-))){1,61}[a-z0-9]$"
>;
}

@armResourceOperations
interface AppAttachPackages {
/**
* Get an app attach package.
*/
get is ArmResourceRead<AppAttachPackage>;

/**
* Create or update an App Attach package.
*/
createOrUpdate is ArmResourceCreateOrReplaceSync<AppAttachPackage>;

/**
* Update an App Attach Package
*/
@parameterVisibility
update is ArmCustomPatchSync<AppAttachPackage, AppAttachPackagePatch>;

/**
* Remove an App Attach Package.
*/
delete is ArmResourceDeleteSync<AppAttachPackage>;

/**
* List App Attach packages in resource group.
*/
listByResourceGroup is ArmResourceListByParent<
AppAttachPackage,
Parameters = {
/**
* OData filter expression. Valid properties for filtering are package name and host pool.
*/
@query("$filter")
$filter?: string;
},
Response = AppAttachPackageList
>;

/**
* List App Attach packages in subscription.
*/
listBySubscription is ArmListBySubscription<
AppAttachPackage,
Parameters = {
/**
* OData filter expression. Valid properties for filtering are package name, host pool, and resource group.
*/
@query("$filter")
$filter?: string;
},
Response = AppAttachPackageList
>;
}

@@maxLength(AppAttachPackage.name, 100);
@@minLength(AppAttachPackage.name, 3);
@@doc(AppAttachPackage.name, "The name of the App Attach package");
@@doc(AppAttachPackage.properties,
"Detailed properties for App Attach Package"
);
@@doc(AppAttachPackages.createOrUpdate::parameters.resource,
"Object containing App Attach Package definitions."
);
@@doc(AppAttachPackages.update::parameters.properties,
"Object containing App Attach Package definition."
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
import "@typespec/openapi";
import "@typespec/rest";
import "./models.tsp";
import "./ApplicationGroup.tsp";

using TypeSpec.Rest;
using Azure.ResourceManager;
using TypeSpec.Http;
using TypeSpec.OpenAPI;

namespace Microsoft.DesktopVirtualization;
/**
* Schema for Application properties.
*/
@parentResource(ApplicationGroup)
model Application
is Azure.ResourceManager.ProxyResource<ApplicationProperties, false> {
...ResourceNameParameter<
Resource = Application,
KeyName = "applicationName",
SegmentName = "applications",
NamePattern = "^[A-Za-z0-9@.\\-_ ]*$"
>;
}

@armResourceOperations
interface Applications {
/**
* Get an application.
*/
get is ArmResourceRead<Application>;

/**
* Create or update an application.
*/
createOrUpdate is ArmResourceCreateOrReplaceSync<Application>;

/**
* Update an application.
*/
@parameterVisibility
update is ArmCustomPatchSync<Application, ApplicationPatch>;

/**
* Remove an application.
*/
delete is ArmResourceDeleteSync<Application>;

/**
* List applications.
*/
list is ArmResourceListByParent<
Application,
Parameters = {
/**
* Number of items per page.
*/
@query("pageSize")
pageSize?: int32;

/**
* Indicates whether the collection is descending.
*/
@query("isDescending")
isDescending?: boolean;

/**
* Initial number of items to skip.
*/
@query("initialSkip")
initialSkip?: int32;
},
Response = ApplicationList
>;
}

@@maxLength(Application.name, 24);
@@minLength(Application.name, 3);
@@doc(Application.name,
"The name of the application within the specified application group"
);
@@doc(Application.properties, "Detailed properties for Application");
@@doc(Applications.createOrUpdate::parameters.resource,
"Object containing Application definitions."
);
@@doc(Applications.update::parameters.properties,
"Object containing Application definitions."
);
Loading
Loading