MCPcopy Create free account
hub / github.com/Azure/azure-resource-manager-schemas

github.com/Azure/azure-resource-manager-schemas @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
223 symbols 468 edges 51 files ⚖ MIT 8 documented · 4% ● updated 8d ago★ 628115 open issues

Browse by type

⨍ Functions 185◇ Types & classes 38
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

azure-resource-manager-schemas

[!WARNING]

The schemas in this repository are designed for best-effort validation, and should NOT be relied upon for accuracy or programmatic consumption. If you have a current (or potential new) dependency that you would like to discuss alternatives for, please raise an issue.

This is the repo for template deployment schemas hosted under https://schema.management.azure.com/schemas. Please see below for information on contributing and publishing updated schemas.

Updating Schemas

[!NOTE] We only publish template schemas for resource providers that are publicly available. This means that there should be no restrictions (private preview, internal-only allowlisting) on who can call your APIs. As a general rule, if there is not an API definition in the Public API Specs Repo, we will not consider a PR.

Schemas are generated and updated automatically, and should not require any action from RP teams.

Generating Locally

Schema generation uses only the C# generator in src/TemplateSchemaGenerator, reading pre-built Bicep types from the pinned bicep-types-az/generated submodule. It does not regenerate types from Swagger specs. To use newer API definitions, update the submodule to a commit containing the corresponding generated Bicep types.

Instructions

  1. Fork this repo, and clone it locally.
  2. Install the .NET SDK specified by global.json and Node.js, then initialize submodules and publish the generator: bash git submodule update --init --recursive dotnet publish src/TemplateSchemaGenerator
  3. Install the orchestration dependencies and generate a provider: bash npm --prefix generator ci npm --prefix generator run generate -- --provider-namespace Microsoft.Compute

Run npm --prefix generator run generate without --provider-namespace to generate all providers in the Bicep types index in one run and update their root-schema references directly. Existing schemas and references for other providers are preserved. Both modes write a Markdown summary to summary.log by default; use --summary-log-path to choose another location.

Generation supports all providers or a single --provider-namespace; Swagger paths and readmes are not supported as generation inputs. Providers missing from the Bicep types index fail explicitly. The retired Swagger-to-SDK automation integration and its package-result output are no longer supported.

Providers with no writable resource types do not produce deployment schemas. A successful C# generation run with no schema output is reported as skipped in the summary, not as a failure. Missing providers and C# execution errors still fail generation.

The C# generator preserves Compute's VM and VM scale-set extension overrides, including nested extensions and inline scale-set extension profiles. It embeds the curated definitions in Microsoft.Compute.Extensions.json; generated extension resources and their root-schema references use the companion Microsoft.Compute.Extensions.json schema for each API version.

For compatibility with schema consumers, the C# generator replaces / with _ in named definition keys and uses the rewritten keys in $ref values. Keys that collide after this replacement or case-insensitive comparison receive numeric suffixes. Resource type values and payload property names are unchanged.

Validate the TypeScript generator with npm --prefix generator run lint and npm --prefix generator run build, and run C# generator tests with dotnet test.

Runing Unit Tests

Use the following commands to execute the test suite locally:

npm --prefix tools ci
npm --prefix tools test

Once this is running, you can create a basic template with the following structure (replacing the sections between < and > as appropriate for your scenario):

{
  "$schema": "http://<hostname>:<port>/schemas/2019-04-01/deploymentTemplate.json",
  "resources": [
    {
      "type": "<providerNamespace>/<resourceType>",
      "apiVersion": "<apiVersion>",
      "properties": {
      }
    }
  ]
}

NOTE Many client tools will cache responses from schema servers, so you may need to clear this cache if you are testing modifications, or alternatively, change the port between retries.


This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Extension points exported contracts — how you extend this code

browse all types & interfaces →

Core symbols most depended-on inside this repo

browse all functions →

Shape

Function 97
Method 88
Class 26
Interface 11
Enum 1

Languages

C#50%
TypeScript50%

Modules by API surface

src/TemplateSchemaGenerator/Generators/JsonSchemaGenerator.cs30 symbols
generator/generate.ts19 symbols
src/TemplateSchemaGenerator.Tests/ExportTemplateEngineScenarioTests.cs18 symbols
generator/utils.ts17 symbols
src/TemplateSchemaGenerator.Tests/TestSchemaCache.cs9 symbols
src/TemplateSchemaGenerator.Tests/JsonSchemaGeneratorTests.cs9 symbols
src/DeploymentsSchemaTests/TestSchemaCache.cs9 symbols
tools/src/cycleCheck.ts8 symbols
src/TemplateSchemaGenerator/MainGenerator.cs8 symbols
src/TemplateSchemaGenerator.Tests/OutputPreservationTests.cs8 symbols
generator/models.ts8 symbols
src/TemplateSchemaGenerator/ResourceTypeProvider.cs7 symbols

For agents

$ claude mcp add azure-resource-manager-schemas \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page