Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
6a1bc7e
The first version of TSP
v-zhocai Aug 8, 2025
59119b6
fix error and diff
v-zhocai Aug 8, 2025
9df12f9
solve warning
v-zhocai Aug 20, 2025
e34cff3
modify readme and delete old json
v-zhocai Aug 21, 2025
91dcd21
Merge branch 'main' into convert/domainregistration
v-zhocai Aug 25, 2025
2bcfdf1
update tspconfig.yaml
v-zhocai Aug 25, 2025
879daa2
fix operationid and other errors
v-zhocai Aug 26, 2025
ace1a98
fix added model
v-zhocai Aug 26, 2025
4e4b844
modify parameter name
v-zhocai Aug 27, 2025
8b932c6
update
welovej Aug 28, 2025
9808c2f
update
v-zhocai Aug 29, 2025
8130589
use DefaultErrorResponce
v-zhocai Sep 3, 2025
b1ae3fc
delete duplicate dnstype
v-zhocai Sep 3, 2025
04e07bf
Merge branch 'main' into convert/domainregistration
v-zhocai Sep 3, 2025
4130b1f
fix ci error
v-zhocai Sep 4, 2025
3be28a6
fix swagger modelvalidation error
v-zhocai Sep 4, 2025
c040100
delete unused decorator and suppress
v-zhocai Sep 4, 2025
1e2a7b1
fix swagger avocado
v-zhocai Sep 4, 2025
26d2044
Update Domain.tsp
v-zhocai Sep 4, 2025
f8eb5b2
update tspconfig.yaml
v-zhocai Sep 15, 2025
19db79c
update back-compatible.tsp
v-zhocai Sep 15, 2025
b00c43a
Merge branch 'main' into convert/domainregistration
v-zhocai Sep 25, 2025
71c13d0
update according to review
v-zhocai Sep 25, 2025
dd4bd0c
Merge branch 'main' into convert/domainregistration
v-zhocai Oct 9, 2025
eab673d
move files and modify tspconfig
v-zhocai Oct 9, 2025
05dcaf6
modify tspconfig
v-zhocai Oct 9, 2025
4727581
modify tspconfig
v-zhocai Oct 9, 2025
4640b7e
update readme
v-zhocai Oct 10, 2025
e97be7f
Merge branch 'Azure:main' into convert/domainregistration
v-zhocai Oct 15, 2025
005aa4f
update to use decorator directly
v-zhocai Oct 17, 2025
aeed3ee
Update
v-zhocai Oct 22, 2025
f5709d9
Update
v-zhocai Oct 22, 2025
b6cbaa9
Update
v-zhocai Oct 23, 2025
4f68803
run tsp format
v-zhocai Oct 30, 2025
aea72df
fix diff
v-zhocai Oct 30, 2025
99ee592
add summary
v-zhocai Oct 30, 2025
5e120c3
delete CommonDefinitions.json
v-zhocai Oct 30, 2025
c559dd2
Merge branch 'main' into convert/domainregistration
v-zhocai Oct 30, 2025
49c456d
several diff fix
v-zhocai Oct 30, 2025
be7734e
update tspconfig
v-zhocai Oct 30, 2025
ecb43f0
delete sparse-spec
v-zhocai Oct 31, 2025
fc11581
update
v-zhocai Oct 31, 2025
8ce68cc
fix suppress
v-zhocai Nov 3, 2025
6edffe5
update
v-zhocai Nov 3, 2025
a6d24fa
update according to comments
v-zhocai Nov 4, 2025
1751fb9
update
v-zhocai Nov 4, 2025
27d1fb4
Merge branch 'main' into convert/domainregistration
v-jiaodi Nov 19, 2025
f87e6f0
Merge branch 'main' into convert/domainregistration
v-jiaodi Dec 4, 2025
b7128ff
Merge branch 'main' into convert/domainregistration
v-jiaodi Dec 5, 2025
d37a652
update client name for js sdk
v-jiaodi Dec 5, 2025
0ef0a9a
Merge branch 'convert/domainregistration' of https://github.com/v-zho…
v-jiaodi Dec 5, 2025
e2ba850
Merge branch 'main' into convert/domainregistration
welovej Jan 12, 2026
8d86af4
Suppress legacy usage warnings in back-compatible.tsp
welovej Jan 12, 2026
3cf6b96
Suppress warnings for secret properties in models
welovej Jan 12, 2026
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
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.DomainRegistration;
/**
* Information about a domain.
*/
model Domain is Azure.ResourceManager.TrackedResource<DomainProperties> {
...ResourceNameParameter<
Resource = Domain,
KeyName = "domainName",
SegmentName = "domains",
NamePattern = "[a-zA-Z0-9][a-zA-Z0-9\\.-]+"
>;

/**
* Kind of resource
*/
#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
kind?: string;
}

@armResourceOperations
interface Domains {
/**
* Description for Get a domain.
*/
@summary("Get a domain.")
get is ArmResourceRead<Domain, Error = DefaultErrorResponse>;

/**
* Description for Creates or updates a domain.
*/
#suppress "@azure-tools/typespec-azure-resource-manager/arm-put-operation-response-codes" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
#suppress "@azure-tools/typespec-azure-resource-manager/no-response-body" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
@summary("Creates or updates a domain.")
createOrUpdate is ArmResourceCreateOrReplaceAsync<
Domain,
Response = ArmResourceUpdatedResponse<Domain> | (ArmAcceptedLroResponse<LroHeaders = ArmLroLocationHeader<FinalResult = Domain>> & {
@bodyRoot
_: Domain;
}),
Error = DefaultErrorResponse
>;

/**
* Description for Creates or updates a domain.
*/
#suppress "@azure-tools/typespec-azure-resource-manager/no-response-body" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
#suppress "@azure-tools/typespec-azure-resource-manager/lro-location-header" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
@patch(#{ implicitOptionality: false })
@summary("Creates or updates a domain.")
update is ArmCustomPatchSync<
Domain,
PatchModel = DomainPatchResource,
Response = ArmResponse<Domain> | (ArmAcceptedResponse & {
@bodyRoot
_: Domain;
}),
Error = DefaultErrorResponse
>;

/**
* Description for Delete a domain.
*/
@summary("Delete a domain.")
delete is ArmResourceDeleteSync<
Domain,
Parameters = {
/**
* Specify <code>true</code> to delete the domain immediately. The default is <code>false</code> which deletes the domain after 24 hours.
*/
@query("forceHardDeleteDomain")
forceHardDeleteDomain?: boolean;
},
Error = DefaultErrorResponse
>;

/**
* Description for Get all domains in a resource group.
*/
@summary("Get all domains in a resource group.")
listByResourceGroup is ArmResourceListByParent<
Domain,
Response = ArmResponse<DomainCollection>,
Error = DefaultErrorResponse
>;

/**
* Description for Get all domains in a subscription.
*/
@summary("Get all domains in a subscription.")
list is ArmListBySubscription<
Domain,
Response = ArmResponse<DomainCollection>,
Error = DefaultErrorResponse
>;

/**
* Description for Renew a domain.
*/
#suppress "@azure-tools/typespec-azure-resource-manager/arm-post-operation-response-codes" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
#suppress "@azure-tools/typespec-azure-resource-manager/lro-location-header" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
@summary("Renew a domain.")
renew is ArmResourceActionSync<
Domain,
void,
OkResponse | ArmAcceptedResponse | NoContentResponse,
Error = DefaultErrorResponse
>;

/**
* Transfer out domain to another registrar
*/
#suppress "@azure-tools/typespec-azure-resource-manager/arm-put-operation-response-codes" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
@put
@summary("Transfer out domain to another registrar")
transferOut is ArmResourceActionSync<
Domain,
void,
ArmResponse<Domain> | ArmBadRequestResponse,
Error = DefaultErrorResponse
>;
}

@@doc(Domain.name, "Name of the domain.");
@@doc(Domain.properties, "Domain resource specific properties");
@@doc(Domains.createOrUpdate::parameters.resource,
"Domain registration information."
);
@@doc(Domains.update::parameters.properties,
"Domain registration information."
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
import "@typespec/openapi";
import "@typespec/rest";
import "./models.tsp";
import "./Domain.tsp";

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

namespace Microsoft.DomainRegistration;
/**
* Domain ownership Identifier.
*/
@parentResource(Domain)
model DomainOwnershipIdentifier
is Azure.ResourceManager.ProxyResource<DomainOwnershipIdentifierProperties> {
...ResourceNameParameter<
Resource = DomainOwnershipIdentifier,
KeyName = "name",
SegmentName = "domainOwnershipIdentifiers",
NamePattern = ""
>;

/**
* Kind of resource
*/
#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
kind?: string;
}

@armResourceOperations
interface DomainOwnershipIdentifiers {
/**
* Description for Get ownership identifier for domain
*/
@summary("Get ownership identifier for domain")
getOwnershipIdentifier is ArmResourceRead<
DomainOwnershipIdentifier,
Error = DefaultErrorResponse
>;

/**
* Description for Creates an ownership identifier for a domain or updates identifier details for an existing identifier
*/
#suppress "@azure-tools/typespec-azure-resource-manager/arm-put-operation-response-codes" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
@summary("Creates an ownership identifier for a domain or updates identifier details for an existing identifier")
createOrUpdateOwnershipIdentifier is ArmResourceCreateOrReplaceSync<
DomainOwnershipIdentifier,
Response = ArmResourceUpdatedResponse<DomainOwnershipIdentifier>,
Error = DefaultErrorResponse
>;

/**
* Description for Creates an ownership identifier for a domain or updates identifier details for an existing identifier
*/
@patch(#{ implicitOptionality: false })
@summary("Creates an ownership identifier for a domain or updates identifier details for an existing identifier")
updateOwnershipIdentifier is ArmCustomPatchSync<
DomainOwnershipIdentifier,
PatchModel = DomainOwnershipIdentifier,
Error = DefaultErrorResponse
>;

/**
* Description for Delete ownership identifier for domain
*/
@summary("Delete ownership identifier for domain")
deleteOwnershipIdentifier is ArmResourceDeleteSync<
DomainOwnershipIdentifier,
Error = DefaultErrorResponse
>;

/**
* Description for Lists domain ownership identifiers.
*/
@summary("Lists domain ownership identifiers.")
listOwnershipIdentifiers is ArmResourceListByParent<
DomainOwnershipIdentifier,
Response = ArmResponse<DomainOwnershipIdentifierCollection>,
Error = DefaultErrorResponse
>;
}

@@doc(DomainOwnershipIdentifier.name, "Name of identifier.");
@@doc(DomainOwnershipIdentifier.properties,
"DomainOwnershipIdentifier resource specific properties"
);
@@doc(DomainOwnershipIdentifiers.createOrUpdateOwnershipIdentifier::parameters.resource,
"A JSON representation of the domain ownership properties."
);
@@doc(DomainOwnershipIdentifiers.updateOwnershipIdentifier::parameters.properties,
"A JSON representation of the domain ownership properties."
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
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.DomainRegistration;
/**
* A top level domain object.
*/
@subscriptionResource
model TopLevelDomain
is Azure.ResourceManager.ProxyResource<TopLevelDomainProperties> {
...ResourceNameParameter<
Resource = TopLevelDomain,
KeyName = "name",
SegmentName = "topLevelDomains",
NamePattern = ""
>;

/**
* Kind of resource
*/
#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
kind?: string;
}

@armResourceOperations
interface TopLevelDomains {
/**
* Description for Get details of a top-level domain.
*/
@summary("Get details of a top-level domain.")
get is ArmResourceRead<
TopLevelDomain,
BaseParameters = Azure.ResourceManager.Foundations.SubscriptionBaseParameters,
Error = DefaultErrorResponse
>;

/**
* Description for Get all top-level domains supported for registration.
*/
@summary("Get all top-level domains supported for registration.")
list is ArmResourceListByParent<
TopLevelDomain,
BaseParameters = Azure.ResourceManager.Foundations.SubscriptionBaseParameters,
Response = ArmResponse<TopLevelDomainCollection>,
Error = DefaultErrorResponse
>;

/**
* Description for Gets all legal agreements that user needs to accept before purchasing a domain.
*/
@list
@summary("Gets all legal agreements that user needs to accept before purchasing a domain.")
listAgreements is ArmResourceActionSync<
TopLevelDomain,
TopLevelDomainAgreementOption,
ArmResponse<TldLegalAgreementCollection>,
BaseParameters = Azure.ResourceManager.Foundations.SubscriptionBaseParameters,
Error = DefaultErrorResponse
>;
}

@@doc(TopLevelDomain.name, "Name of the top-level domain.");
@@doc(TopLevelDomain.properties, "TopLevelDomain resource specific properties");
@@doc(TopLevelDomains.listAgreements::parameters.body,
"Domain agreement options."
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import "@azure-tools/typespec-client-generator-core";

using Azure.ClientGenerator.Core;
using Azure.ClientGenerator.Core.Legacy;
using Microsoft.DomainRegistration;

@@clientName(Domains.createOrUpdate::parameters.resource, "domain");
@@clientName(Domains.update::parameters.properties, "domain");
@@clientLocation(DomainOwnershipIdentifiers.getOwnershipIdentifier, Domains);
@@clientLocation(DomainOwnershipIdentifiers.createOrUpdateOwnershipIdentifier,
Domains
);
@@clientName(DomainOwnershipIdentifiers.createOrUpdateOwnershipIdentifier::parameters.resource,
"domainOwnershipIdentifier"
);
@@clientLocation(DomainOwnershipIdentifiers.updateOwnershipIdentifier, Domains);
@@clientName(DomainOwnershipIdentifiers.updateOwnershipIdentifier::parameters.properties,
"domainOwnershipIdentifier"
);
@@clientLocation(DomainOwnershipIdentifiers.deleteOwnershipIdentifier, Domains);
@@clientLocation(DomainOwnershipIdentifiers.listOwnershipIdentifiers, Domains);

@@clientName(TopLevelDomains.listAgreements::parameters.body,
"agreementOption"
);
@@clientLocation(DomainsOperationGroup.checkAvailability, Domains);
@@clientLocation(DomainsOperationGroup.getControlCenterSsoRequest, Domains);
@@clientLocation(DomainsOperationGroup.listRecommendations, Domains);

@@clientName(DomainsOperationGroup.listRecommendations::parameters.body,
"parameters"
);
@@clientName(DomainsOperationGroup.checkAvailability::parameters.body,
"identifier"
);
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
@@flattenProperty(DomainOwnershipIdentifier.properties);

#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
@@flattenProperty(DomainPatchResource.properties);

#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
@@flattenProperty(TopLevelDomain.properties);

#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
@@flattenProperty(Domain.properties);

@@clientLocation(Operations.list, "DomainRegistrationProvider");
@@clientName(Operations.list, "ListOperations");
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import "@azure-tools/typespec-client-generator-core";
import "./main.tsp";

using Azure.ClientGenerator.Core;

@@clientName(Microsoft.DomainRegistration,
"DomainRegistrationManagementClient",
"javascript"
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"parameters": {
"api-version": "2024-11-01",
"identifier": {
"name": "abcd.com"
},
"subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"
},
"responses": {
"200": {
"body": {
"name": "abcd.com",
"available": true,
"domainType": "Regular"
}
}
},
"operationId": "Domains_CheckAvailability",
"title": "Check domain availability"
}
Loading
Loading