Skip to content
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
58ef2b4
convert containerregistry
kazrael2119 Sep 5, 2025
79bfdf7
update
kazrael2119 Sep 8, 2025
0b528ca
update
kazrael2119 Sep 8, 2025
5634805
Update models.tsp
kazrael2119 Sep 8, 2025
b3960e3
Update models.tsp
kazrael2119 Sep 8, 2025
20765d7
update
kazrael2119 Sep 9, 2025
c8b4968
update
kazrael2119 Sep 9, 2025
c4ef7d4
update operation list
kazrael2119 Sep 11, 2025
f57ed8d
update
kazrael2119 Sep 11, 2025
ab2aaf5
update
kazrael2119 Sep 11, 2025
99434cf
update
kazrael2119 Sep 11, 2025
aa3e64a
update
kazrael2119 Sep 11, 2025
ba10312
Merge branch 'main' into containerregistry-conversion
kazrael2119 Sep 11, 2025
a2d5156
update
kazrael2119 Sep 11, 2025
aceb882
Merge branch 'containerregistry-conversion' of https://github.com/kaz…
kazrael2119 Sep 11, 2025
286fa5a
update
kazrael2119 Sep 11, 2025
0f1ffd2
Update ArchiveVersion.tsp
kazrael2119 Sep 11, 2025
c9f738d
fix swagger model-validation:Object didn't pass validation for format…
kazrael2119 Sep 11, 2025
bb385e0
Revert "fix swagger model-validation:Object didn't pass validation fo…
kazrael2119 Sep 11, 2025
d274225
fix: Object didn't pass validation for format arm-id
kazrael2119 Sep 11, 2025
a01062d
update
kazrael2119 Sep 11, 2025
f17f321
update
kazrael2119 Sep 11, 2025
2b1a98b
Merge branch 'main' into containerregistry-conversion
kazrael2119 Sep 12, 2025
841c94f
Merge branch 'main' into containerregistry-conversion
kazrael2119 Sep 12, 2025
b8dc94d
update
kazrael2119 Sep 12, 2025
e2e3d02
update
kazrael2119 Sep 12, 2025
cb5793a
Update client.tsp
kazrael2119 Sep 16, 2025
beb294d
java config
XiaofeiCao Sep 24, 2025
9aee2b4
Merge branch 'main' into pr/37169
kazrael2119 Oct 15, 2025
a85b513
update
kazrael2119 Oct 15, 2025
cffcea9
update
kazrael2119 Oct 15, 2025
47b5907
support 2025-11-01
kazrael2119 Oct 15, 2025
cc11b7f
Update models.tsp
kazrael2119 Oct 15, 2025
d6ffced
fix ci
kazrael2119 Oct 16, 2025
9532631
prettier fix
kazrael2119 Oct 16, 2025
3a88294
fix model validation
kazrael2119 Oct 16, 2025
f17e128
update
kazrael2119 Oct 16, 2025
46f0876
Merge branch 'main' into containerregistry-conversion
kazrael2119 Oct 16, 2025
758a377
java config
weidongxu-microsoft Oct 17, 2025
d84751b
go config
tadelesh Oct 17, 2025
492b596
fix python config
msyyc Oct 17, 2025
bc234bd
add configuration for python
msyyc Oct 20, 2025
70cd136
Update client.tsp
kazrael2119 Oct 21, 2025
5d512fa
add clientname
jliusan Oct 23, 2025
86b5cf2
resolve comment
kazrael2119 Oct 24, 2025
ee1656a
update
kazrael2119 Oct 24, 2025
bc37e07
Update PrivateLinkResource.tsp
kazrael2119 Oct 27, 2025
37fcabc
Merge branch 'main' into containerregistry-conversion
pshao25 Oct 27, 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
import "@typespec/openapi";
import "@typespec/rest";
import "./models.tsp";
import "./Registry.tsp";

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

namespace Microsoft.ContainerRegistry;

#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
interface AchieveOperationOps
extends Azure.ResourceManager.Legacy.LegacyOperations<
{
...ApiVersionParameter,
...SubscriptionIdParameter,
...ResourceGroupParameter,
...Azure.ResourceManager.Legacy.Provider,

/**
* The name of the container registry.
*/
@path
@segment("registries")
@pattern("^[a-zA-Z0-9]*$")
@minLength(5)
@maxLength(50)
@doc("The name of the container registry.")
registryName: string,

/**
* The package type.
*/
@path
@segment("packages")
@minLength(3)
@maxLength(50)
@pattern("^[a-zA-Z]*$")
@doc("The package type.")
packageType: string,
},
{
/**
* The name of the archive resource.
*/
@path
@segment("archives")
@pattern("^[a-zA-Z0-9-]*$")
@minLength(5)
@maxLength(200)
@doc("The name of the archive resource.")
archiveName: string,
}
> {}

#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
interface AchieveOps
extends Azure.ResourceManager.Legacy.LegacyOperations<
{
...ApiVersionParameter,
...SubscriptionIdParameter,
...ResourceGroupParameter,
...Azure.ResourceManager.Legacy.Provider,

/**
* The name of the container registry.
*/
@path
@segment("registries")
@pattern("^[a-zA-Z0-9]*$")
@minLength(5)
@maxLength(50)
@doc("The name of the container registry.")
registryName: string,

/**
* The package type.
*/
@path
@minLength(3)
@maxLength(50)
@pattern("^[a-zA-Z]*$")
@segment("packages")
@doc("The package type.")
packageType: string,
},
{}
> {}

/**
* An object that represents a archive for a container registry.
*/
@parentResource(Registry)
model Archive is Azure.ResourceManager.ProxyResource<ArchiveProperties> {
...ResourceNameParameter<
Resource = Archive,
KeyName = "archiveName",
SegmentName = "archives",
NamePattern = "^[a-zA-Z0-9-]*$"
>;
}

@armResourceOperations
interface Archives {
/**
* Gets the properties of the archive.
*/
get is AchieveOperationOps.Read<Archive>;

/**
* Creates a archive for a container registry with the specified parameters.
*/
create is AchieveOperationOps.CreateOrUpdateAsync<Archive>;

/**
* Updates a archive for a container registry with the specified parameters.
*/
#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-patch" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
@patch(#{ implicitOptionality: false })
update is AchieveOperationOps.CustomPatchSync<
Archive,
PatchModel = ArchiveUpdateParameters
>;

/**
* Deletes a archive from a container registry.
*/
delete is AchieveOperationOps.DeleteWithoutOkAsync<Archive>;

/**
* Lists all archives for the specified container registry and package type.
*/
@action("archives")
@list
list is AchieveOps.Read<Archive, Response = ArmResponse<ArchiveListResult>>;
}

@@maxLength(Archive.name, 200);
@@minLength(Archive.name, 5);
@@doc(Archive.name, "The name of the archive resource.");
@@doc(Archive.properties, "The properties of the archive.");
@@doc(Archives.create::parameters.resource,
"The parameters for creating a archive."
);
@@doc(Archives.update::parameters.properties,
"The parameters for updating a archive."
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
import "@typespec/openapi";
import "@typespec/rest";
import "./models.tsp";
import "./Archive.tsp";

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

namespace Microsoft.ContainerRegistry;

#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
interface ArchiveVersionOperationOps
extends Azure.ResourceManager.Legacy.LegacyOperations<
{
...ApiVersionParameter,
...SubscriptionIdParameter,
...ResourceGroupParameter,
...Azure.ResourceManager.Legacy.Provider,

/**
* The name of the container registry.
*/
@path
@segment("registries")
@pattern("^[a-zA-Z0-9]*$")
@minLength(5)
@maxLength(50)
@doc("The name of the container registry.")
registryName: string,

/**
* The package type.
*/
@path
@segment("packages")
@minLength(3)
@maxLength(50)
@pattern("^[a-zA-Z]*$")
@doc("The package type.")
packageType: string,

/**
* The name of the archive resource.
*/
@path
@segment("archives")
@pattern("^[a-zA-Z0-9-]*$")
@minLength(5)
@maxLength(200)
@doc("The name of the archive resource.")
archiveName: string,
},
{
/**
* The name of the archive version resource.
*/
@path
@segment("versions")
@pattern("^[a-zA-Z0-9-]*$")
@minLength(5)
@maxLength(200)
@doc("The name of the archive version resource.")
archiveVersionName: string,
}
> {}

#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
interface ArchiveVersionListOps
extends Azure.ResourceManager.Legacy.LegacyOperations<
{
...ApiVersionParameter,
...SubscriptionIdParameter,
...ResourceGroupParameter,
...Azure.ResourceManager.Legacy.Provider,

/**
* The name of the container registry.
*/
@path
@segment("registries")
@pattern("^[a-zA-Z0-9]*$")
@minLength(5)
@maxLength(50)
@doc("The name of the container registry.")
registryName: string,

/**
* The package type.
*/
@path
@segment("packages")
@minLength(3)
@maxLength(50)
@pattern("^[a-zA-Z]*$")
@doc("The package type.")
packageType: string,

/**
* The name of the archive resource.
*/
@path
@segment("archives")
@pattern("^[a-zA-Z0-9-]*$")
@minLength(5)
@maxLength(200)
@doc("The name of the archive resource.")
archiveName: string,
},
{}
> {}
/**
* An object that represents an export pipeline for a container registry.
*/
@parentResource(Archive)
model ArchiveVersion
is Azure.ResourceManager.ProxyResource<ArchiveVersionProperties> {
...ResourceNameParameter<
Resource = ArchiveVersion,
KeyName = "archiveVersionName",
SegmentName = "versions",
NamePattern = "^[a-zA-Z0-9-]*$"
>;
}

@armResourceOperations
interface ArchiveVersions {
/**
* Gets the properties of the archive version.
*/
get is ArchiveVersionOperationOps.Read<ArchiveVersion>;

/**
* Creates a archive version for a container registry with the specified parameters.
*/
create is ArchiveVersionOperationOps.CreateOrUpdateAsync<
ArchiveVersion,
Request = void
>;

/**
* Deletes a archive version from a container registry.
*/
delete is ArchiveVersionOperationOps.DeleteWithoutOkAsync<ArchiveVersion>;

/**
* Lists all archive versions for the specified container registry, repository type and archive name.
*/
@action("versions")
@list
list is ArchiveVersionListOps.Read<
ArchiveVersion,
Response = ArmResponse<ArchiveVersionListResult>
>;
}

@@maxLength(ArchiveVersion.name, 200);
@@minLength(ArchiveVersion.name, 5);
@@doc(ArchiveVersion.name, "The name of the archive version resource.");
@@doc(ArchiveVersion.properties, "The properties of the archive.");
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
import "@typespec/openapi";
import "@typespec/rest";
import "./models.tsp";
import "./Registry.tsp";

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

namespace Microsoft.ContainerRegistry;
/**
* An object that represents a cache rule for a container registry.
*/
@parentResource(Registry)
model CacheRule is Azure.ResourceManager.ProxyResource<CacheRuleProperties> {
...ResourceNameParameter<
Resource = CacheRule,
KeyName = "cacheRuleName",
SegmentName = "cacheRules",
NamePattern = "^[a-zA-Z0-9-]*$"
>;
}

@armResourceOperations
interface CacheRules {
/**
* Gets the properties of the specified cache rule resource.
*/
get is ArmResourceRead<CacheRule>;

/**
* Creates a cache rule for a container registry with the specified parameters.
*/
create is ArmResourceCreateOrReplaceAsync<CacheRule>;

/**
* Updates a cache rule for a container registry with the specified parameters.
*/
@patch(#{ implicitOptionality: false })
update is ArmCustomPatchAsync<
CacheRule,
PatchModel = CacheRuleUpdateParameters,
Response = ArmResponse<CacheRule> | ArmResourceCreatedResponse<
CacheRule,
LroHeaders = ArmAsyncOperationHeader<FinalResult = CacheRule> &
Azure.Core.Foundations.RetryAfterHeader
>
>;

/**
* Deletes a cache rule resource from a container registry.
*/
delete is ArmResourceDeleteWithoutOkAsync<CacheRule>;

/**
* Lists all cache rule resources for the specified container registry.
*/
@list
list is ArmResourceListByParent<
CacheRule,
Response = ArmResponse<CacheRulesListResult>
>;
}

@@maxLength(CacheRule.name, 50);
@@minLength(CacheRule.name, 5);
@@doc(CacheRule.name, "The name of the cache rule.");
@@doc(CacheRule.properties, "The properties of the cache rule.");
@@doc(CacheRules.create::parameters.resource,
"The parameters for creating a cache rule."
);
@@doc(CacheRules.update::parameters.properties,
"The parameters for updating a cache rule."
);
Loading
Loading