Giter VIP home page Giter VIP logo

azure-resource-manager-schemas's Introduction

azure-resource-manager-schemas

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.

Submitting a PR

Tests

Use the following commands to execute the test suite locally:

  • cd tools
  • npm install
  • npm test

Autogenerating from swagger

You can use the generator in this repo to automatically generate a schema from a swagger spec checked into the azure-rest-api-specs repo. We are working on fully automating this process, but please note that until then, it is your responsibility to ensure that the auto-generated schema has been correctly formatted before submitting a pull request.

See Generator README for more information.

Instructions

  1. Fork this repo, and clone it locally.
  2. Run the following commands (replace the base path accordingly - valid paths can be disovered with npm run list-basepaths):
    • cd generator
    • npm install
    • npm run generate-single myprovider/resource-manager
  3. Review the generator logs to ensure no errors, and review the changes generated.
  4. Ensure that you have reviewed the guidelines under Submitting a PR.
  5. Generate a commit and push it to your fork.
  6. Submit a pull request to this repo. Please include the full command output in a PR comment.

Testing schemas locally

This repo contains a command to run a schema web server which will host files directly from your local repo. This can be useful if you want to validate schemas against a particular tool - for example if you want to verify VSCode autocompletion and syntax highlighting. By default this will listen on port 3000, but this can be modified by editing tools/server.ts. To start an instance you can use the following commands:

  • cd tools
  • npm install
  • npm run serve

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 [email protected] with any additional questions or comments.

azure-resource-manager-schemas's People

Contributors

anthony-c-martin avatar anton-evseev avatar blocphan avatar blueww avatar cyibarra avatar evgenyagafonchikov avatar gbowerman avatar haitsongmsft avatar jaredmoo avatar jasonyang-msft avatar kvish avatar leonardbf avatar mabhard avatar pilor avatar quasarse avatar radennis avatar rhencke avatar rileymckenna avatar rkmanda avatar solankisamir avatar sonathan avatar swylezol avatar t-robalt avatar thbagley avatar tiano2017 avatar vanbasten2323 avatar vrdmr avatar waynekuo avatar wenwu449 avatar yangl900 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.