Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 2.74 KB

File metadata and controls

36 lines (27 loc) · 2.74 KB

Generator

Getting started

  1. Checkout this repo
  2. cd generator
  3. npm install

Running commands

  • npm run clean - cleans local modifications to the schemas directory
  • npm run list-basepaths - lists all the valid base paths for generation
  • npm run generate-all - re-generates all autogenerated schemas
  • npm run generate-single {basePath} - re-generates all api versions under a given specs base path
  • See package.json for more commands

Daily autogeneration

Autogeneration Pipeline

Build Status

View the Pipeline Configuration here.

Merging Pipeline-generated schemas

  1. Review the status badge on this page to ensure the latest run was successful.
  2. Create a Pull Request from autogenerate to master.
  3. If there are any modifications to schemas/common/autogeneratedResources.json, push a commit to the autogenerate branch to make any corresponding changes to schemas/2014-04-01-preview/deploymentTemplate.json and schemas/2015-01-01/deploymentTemplate.json.

Onboarding teams to autogeneration pipeline

  1. Run npm run list-basepaths to discover the specs repo path containing the swagger definitions.
  2. Run npm run generate-single {basePath} to generate schemas for them. Save the output to file.
  3. Remove all references to the provider namespace from schemas/2019-04-01/deploymentTemplate.json.
  4. If there are any modifications to schemas/common/autogeneratedResources.json, you may need to make corresponding changes to schemas/2014-04-01-preview/deploymentTemplate.json and schemas/2015-01-01/deploymentTemplate.json.
  5. Add the {basePath} to the whitelist array in generator/constants.ts.
  6. Commit all the changed files, and submit a PR to this repo with title "Onboarding {provider} for autogeneration". Include the full output saved in step 2 as a comment.
  7. Ensure all CI tests pass, and ask the team to review the PR (including tool output) to ensure that all expected resources have been detected and generated as expected.