This is the repo for template deployment schemas hosted at: https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json
Welcome to contribute to template deployment schemas, please send pull request to improve the schemas. We will review the pull request and publish the latest schemas to https://schema.management.azure.com/schemas
- When you add a new resource type in schema, please add it into schemas\2014-04-01-preview\deploymentTemplate.json and schemas\2015-01-01\deploymentTemplate.json
- Please add or update tests for your change.
- Please test your change with following two node.js scripts:
- tools\validateJSON.js and ResourceMetaSchema.json:
The script uses the ResourceMetaSchema.json to do some basic checks against the new/updated schema file.
Usage:
Node validateJSON.js <schema file path> ResourceMetaSchema.json <schema folder path>
Sample:
Node validateJSON.js ..\schemas\2015-08-01\Microsoft.Compute.json ResourceMetaSchema.json ..\schemas\ - tools\runSchemaTests.js
The script uses all test JSON files under tests folder to test against the schema files.
Usage:
Node runSchemaTests.js [--dir folder] [--AssertSubErrors]
To run tests in single folder:
Node runSchemaTests.js --dir ..\tests\2018-08-01
To run tests in single folder and assert subErrors:
Node runSchemaTests.js --dir ..\tests\2018-08-01 --AssertSubErrors
- tools\validateJSON.js and ResourceMetaSchema.json:
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.