sdk/containerregistry/Azure.Containers.ContainerRegistry/src/autorest.md
Run dotnet build /t:GenerateCode to generate code.
title: Container Registry
input-file:
- https://github.com/Azure/azure-rest-api-specs/blob/c8d9a26a2857828e095903efa72512cf3a76c15d/specification/containerregistry/data-plane/Azure.ContainerRegistry/stable/2021-07-01/containerregistry.json
model-namespace: false
generation1-convenience-client: true
directive:
from: swagger-document
where: $.definitions.TagOrderBy
transform: >
$['x-ms-enum']["name"] = "ArtifactTagOrder"
directive:
from: swagger-document
where: $.definitions.ManifestOrderBy
transform: >
$['x-ms-enum']["name"] = "ArtifactManifestOrder"
directive:
- from: swagger-document
where: $["paths"]["/acr/v1/{name}"]
transform: >
delete $.delete["responses"]["202"].schema
directive:
- from: swagger-document
where: $["paths"]["/oauth2/token"]
transform: >
delete $.get
directive:
- from: swagger-document
where: $.definitions.TagAttributesBase
transform: >
delete $.properties.signed
directive:
- from: swagger-document
where: $.definitions.ManifestAttributesBase
transform: >
delete $.properties.configMediaType
directive:
from: swagger-document
where: $.paths["/v2/{name}/manifests/{reference}"].put
transform: >
$.parameters.push({
"name": "Content-Type",
"in": "header",
"type": "string",
"description": "The manifest's Content-Type."
});
delete $.responses["201"].schema;
directive:
from: swagger-document
where: $.parameters.NextLink
transform: >
$["x-ms-client-name"] = "nextLink"
directive:
from: swagger-document
where: $.definitions.OCIManifest
transform: >
$["x-csharp-usage"] = "model,input,output,converter";
$["x-csharp-formats"] = "json";
$["x-ms-client-name"] = "OciImageManifest";
$["required"] = ["schemaVersion"];
delete $["x-accessibility"];
delete $["allOf"];
$.properties["schemaVersion"] = {
"type": "integer",
"description": "Schema version"
};
$.properties.config["x-ms-client-name"] = "configuration";
directive:
from: swagger-document
where: $.parameters.ManifestBody
transform: >
$.schema = {
"type": "string",
"format": "binary"
}
directive:
from: swagger-document
where: $.definitions.Descriptor
transform: >
$["x-ms-client-name"] = "OciDescriptor";
$.properties.size["x-ms-client-name"] = "sizeInBytes";
delete $["x-accessibility"]
directive:
from: swagger-document
where: $.definitions.Annotations
transform: >
delete $["x-accessibility"]
directive:
- from: swagger-document
where: $.
transform: >
delete $["securityDefinitions"];
delete $["security"];
deleteBlobdirective:
- from: swagger-document
where: $.paths["/v2/{name}/blobs/{digest}"]["delete"]
transform: >
delete $.responses["202"].schema;
directive:
from: swagger-document
where: $.paths["/{nextBlobUuidLink}"].patch
transform: >
$.parameters.push({
"name": "Content-Range",
"in": "header",
"type": "string",
"description": "Range of bytes identifying the desired block of content represented by the body. Start must the end offset retrieved via status check plus one. Note that this is a non-standard use of the Content-Range header."
});
$.parameters.push({
"name": "Content-Length",
"in": "header",
"type": "string",
"description": "Length of the chunk being uploaded, corresponding the length of the request body."
});
directive:
- from: swagger-document
where: $..[?(@.operationId=='ContainerRegistryBlob_GetBlob' || @.operationId=='ContainerRegistryBlob_GetChunk')]
transform: $["x-csharp-buffer-response"] = false;