Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
ef35785
try migrate
haolingdong-msft Jul 21, 2025
1700b5c
update tsp and compile again
haolingdong-msft Jul 21, 2025
5c15573
Fix and generate
haolingdong-msft Jul 21, 2025
d7f0407
delete temp files
haolingdong-msft Jul 21, 2025
68a95ea
remove old swagger
haolingdong-msft Jul 21, 2025
59f74c5
delete sparse-spec
haolingdong-msft Jul 21, 2025
a186543
fix lint
haolingdong-msft Jul 22, 2025
3378d59
configure sdk emitter
haolingdong-msft Jul 22, 2025
defd8d2
configure sdk emitter
haolingdong-msft Jul 22, 2025
0680c79
configure sdk emitter
haolingdong-msft Jul 22, 2025
51c5df4
fix typespec validation
haolingdong-msft Jul 22, 2025
d8ee9c1
pretieer
haolingdong-msft Jul 22, 2025
878aa6f
remove dnsresolver.json
haolingdong-msft Jul 22, 2025
3f81535
update tspconfig
haolingdong-msft Jul 22, 2025
5888788
fix duplicate actionType issue
haolingdong-msft Jul 22, 2025
f035212
add clientLocation
haolingdong-msft Jul 22, 2025
8fca647
resolve spec changes
haolingdong-msft Jul 25, 2025
1a927e5
fix validation
haolingdong-msft Jul 25, 2025
b2093ac
fix validation
haolingdong-msft Jul 25, 2025
141b219
fix swagger validation
haolingdong-msft Jul 25, 2025
dd18d21
fix swagger validation
haolingdong-msft Jul 25, 2025
9010143
update suppress message and update CloudError
haolingdong-msft Jul 25, 2025
11cbf17
regen swagger
haolingdong-msft Jul 25, 2025
329c525
update
Jul 25, 2025
b5f7e7e
resolve breaking
v-jiaodi Jul 29, 2025
cc6b859
Merge remote-tracking branch 'origin/main' into tsp-conversion-dnsres…
haolingdong-msft Aug 1, 2025
2f4558c
no need client.tsp
haolingdong-msft Aug 1, 2025
21b09e1
Merge branch 'tsp-conversion-dnsresolver' of https://github.com/Azure…
haolingdong-msft Aug 1, 2025
b7bdd18
resolve breaking
v-jiaodi Aug 7, 2025
db24c04
Update tspconfig.yaml
haolingdong-msft Aug 14, 2025
9bad76b
Update tspconfig.yaml
tadelesh Aug 19, 2025
f9ea2cd
Merge branch 'main' into tsp-conversion-dnsresolver
haolingdong-msft Aug 20, 2025
36d8200
fix lro and paging validation errors
haolingdong-msft Aug 20, 2025
c2f20bd
remove sparse-spec
haolingdong-msft Aug 21, 2025
abf5637
Fix partial resource
Aug 21, 2025
92dc401
Add .net configuration
Aug 22, 2025
680bb1d
update etag
haolingdong-msft Aug 22, 2025
01b6415
remove operation id
haolingdong-msft Aug 22, 2025
d1e4949
suppress validation error
haolingdong-msft Aug 22, 2025
1639bd5
use using Network
haolingdong-msft Aug 22, 2025
3e2ac28
update .net configuration
Aug 25, 2025
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
Next Next commit
try migrate
  • Loading branch information
haolingdong-msft committed Jul 21, 2025
commit ef35785720ad6cd5e83e348a42471edb7a659c8c
1 change: 1 addition & 0 deletions sparse-spec
Submodule sparse-spec added at 21f9b6
133 changes: 133 additions & 0 deletions specification/dnsresolver/Network.Management/DnsForwardingRuleset.tsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
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.Network;
/**
* Describes a DNS forwarding ruleset.
*/
model DnsForwardingRuleset
is Azure.ResourceManager.TrackedResource<
DnsForwardingRulesetProperties,
false
> {
...ResourceNameParameter<
Resource = DnsForwardingRuleset,
KeyName = "dnsForwardingRulesetName",
SegmentName = "dnsForwardingRulesets",
NamePattern = ""
>;
...Azure.ResourceManager.EntityTagProperty;
}

@armResourceOperations
interface DnsForwardingRulesets {
/**
* Gets a DNS forwarding ruleset properties.
*/
get is ArmResourceRead<DnsForwardingRuleset>;

/**
* Creates or updates a DNS forwarding ruleset.
*/
#suppress "@azure-tools/typespec-azure-resource-manager/arm-put-operation-response-codes" "For backward compatibility"
createOrUpdate is ArmResourceCreateOrReplaceAsync<
DnsForwardingRuleset,
Parameters = {
/**
* ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes.
*/
@header
IfMatch?: string;

/**
* Set to '*' to allow a new resource to be created, but to prevent updating an existing resource. Other values will be ignored.
*/
@header
IfNoneMatch?: string;
},
Response = ArmResourceUpdatedResponse<DnsForwardingRuleset> | ArmResourceCreatedResponse<
DnsForwardingRuleset,
ArmLroLocationHeader & Azure.Core.Foundations.RetryAfterHeader
> | ArmAcceptedLroResponse
>;

/**
* Updates a DNS forwarding ruleset.
*/
@patch(#{ implicitOptionality: false })
update is ArmCustomPatchAsync<
DnsForwardingRuleset,
PatchModel = DnsForwardingRulesetPatch,
Parameters = {
/**
* ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes.
*/
@header
IfMatch?: string;
}
>;

/**
* Deletes a DNS forwarding ruleset. WARNING: This operation cannot be undone. All forwarding rules within the ruleset will be deleted.
*/
#suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility"
delete is ArmResourceDeleteWithoutOkAsync<
DnsForwardingRuleset,
Parameters = {
/**
* ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes.
*/
@header
IfMatch?: string;
},
Response = ArmDeletedResponse | ArmDeleteAcceptedLroResponse | ArmDeletedNoContentResponse
>;

/**
* Lists DNS forwarding rulesets within a resource group.
*/
listByResourceGroup is ArmResourceListByParent<
DnsForwardingRuleset,
Parameters = {
/**
* The maximum number of results to return. If not specified, returns up to 100 results.
*/
@query("$top")
$top?: int32;
}
>;

/**
* Lists DNS forwarding rulesets in all resource groups of a subscription.
*/
list is ArmListBySubscription<
DnsForwardingRuleset,
Parameters = {
/**
* The maximum number of results to return. If not specified, returns up to 100 results.
*/
@query("$top")
$top?: int32;
}
>;
}

@@doc(DnsForwardingRuleset.name, "The name of the DNS forwarding ruleset.");
@@encodedName(DnsForwardingRuleset.eTag, "application/json", "etag");
@@doc(DnsForwardingRuleset.properties,
"Properties of the DNS forwarding ruleset."
);
@@doc(DnsForwardingRulesets.createOrUpdate::parameters.resource,
"Parameters supplied to the CreateOrUpdate operation."
);
@@doc(DnsForwardingRulesets.update::parameters.properties,
"Parameters supplied to the Update operation."
);
128 changes: 128 additions & 0 deletions specification/dnsresolver/Network.Management/DnsResolver.tsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
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.Network;
/**
* Describes a DNS resolver.
*/
model DnsResolver
is Azure.ResourceManager.TrackedResource<DnsResolverProperties, false> {
...ResourceNameParameter<
Resource = DnsResolver,
KeyName = "dnsResolverName",
SegmentName = "dnsResolvers",
NamePattern = ""
>;
...Azure.ResourceManager.EntityTagProperty;
}

@armResourceOperations
interface DnsResolvers {
/**
* Gets properties of a DNS resolver.
*/
get is ArmResourceRead<DnsResolver>;

/**
* Creates or updates a DNS resolver.
*/
#suppress "@azure-tools/typespec-azure-resource-manager/arm-put-operation-response-codes" "For backward compatibility"
createOrUpdate is ArmResourceCreateOrReplaceAsync<
DnsResolver,
Parameters = {
/**
* ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes.
*/
@header
IfMatch?: string;

/**
* Set to '*' to allow a new resource to be created, but to prevent updating an existing resource. Other values will be ignored.
*/
@header
IfNoneMatch?: string;
},
Response = ArmResourceUpdatedResponse<DnsResolver> | ArmResourceCreatedResponse<
DnsResolver,
ArmLroLocationHeader & Azure.Core.Foundations.RetryAfterHeader
> | ArmAcceptedLroResponse
>;

/**
* Updates a DNS resolver.
*/
@patch(#{ implicitOptionality: false })
update is ArmCustomPatchAsync<
DnsResolver,
PatchModel = DnsResolverPatch,
Parameters = {
/**
* ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes.
*/
@header
IfMatch?: string;
}
>;

/**
* Deletes a DNS resolver. WARNING: This operation cannot be undone.
*/
#suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility"
delete is ArmResourceDeleteWithoutOkAsync<
DnsResolver,
Parameters = {
/**
* ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes.
*/
@header
IfMatch?: string;
},
Response = ArmDeletedResponse | ArmDeleteAcceptedLroResponse | ArmDeletedNoContentResponse
>;

/**
* Lists DNS resolvers within a resource group.
*/
listByResourceGroup is ArmResourceListByParent<
DnsResolver,
Parameters = {
/**
* The maximum number of results to return. If not specified, returns up to 100 results.
*/
@query("$top")
$top?: int32;
}
>;

/**
* Lists DNS resolvers in all resource groups of a subscription.
*/
list is ArmListBySubscription<
DnsResolver,
Parameters = {
/**
* The maximum number of results to return. If not specified, returns up to 100 results.
*/
@query("$top")
$top?: int32;
}
>;
}

@@doc(DnsResolver.name, "The name of the DNS resolver.");
@@encodedName(DnsResolver.eTag, "application/json", "etag");
@@doc(DnsResolver.properties, "Properties of the DNS resolver.");
@@doc(DnsResolvers.createOrUpdate::parameters.resource,
"Parameters supplied to the CreateOrUpdate operation."
);
@@doc(DnsResolvers.update::parameters.properties,
"Parameters supplied to the Update operation."
);
Loading