Azure / azure-resource-manager-schemas

Schemas used to author and validate Resource Manager Templates. These schemas power the intellisense and syntax completion in our ARM Tools VSCode extension, as well as the Export Template API
MIT License
610 stars 517 forks source link

Onboard NGINX.NGINXPLUS/deployments 2021-05-01-preview #2388

Open limingu opened 2 years ago

limingu commented 2 years ago

NGINX.NGINXPLUS has been public preview. It has the swagger in public repo. https://github.com/Azure/azure-rest-api-specs/blob/main/specification/nginx/resource-manager/NGINX.NGINXPLUS/preview/2021-05-01-preview/swagger.json

But it didn't autogenerate the schema.

Even when I try to manually generate the schema, the command: npm run generate-single -- --base-path nginx/resource-manager didn't generate the schema as well. I put the command logs as below.

The issue is in the autorest.cmd. I verified that the correct parameters are passed in autorest.cmd. But from the log, it didn't generate any schemas. Could someone please help to see the root cause? Thanks.

npm run generate-single -- --base-path nginx/resource-manager

template-schema-generator@1.0.0 generate-single ts-node cmd/generatesingle "--base-path" "nginx/resource-manager"

[C:\Users\limgu\AppData\Local\Temp\schm_azspc] executing: git fsck [C:\Users\limgu\AppData\Local\Temp\schm_azspc] executing: git reset -q . [C:\Users\limgu\AppData\Local\Temp\schm_azspc] executing: git checkout -q -- . [C:\Users\limgu\AppData\Local\Temp\schm_azspc] executing: git clean -q -fd [C:\Users\limgu\AppData\Local\Temp\schm_azspc] executing: git gc [C:\Users\limgu\AppData\Local\Temp\schm_azspc] executing: git fetch -q [C:\Users\limgu\AppData\Local\Temp\schm_azspc] executing: git checkout -q origin/main Using autogenlist config: { "basePath": "nginx/resource-manager", "namespace": "NGINX.NGINXPLUS" } [C:\work\azure-resource-manager-schemas\generator] executing: C:\work\azure-resource-manager-schemas\generator/node_modules/.bin/autorest.cmd --version=3.0.6374 --use=@autorest/azureresourceschema@3.0.92 --azureresourceschema --output-folder=C:\Users\limgu\AppData\Local\Temp\cxlegm9oc7r --multiapi --pass-thru:subset-reducer --pass-thru:schema-validator-swagger C:\Users\limgu\AppData\Local\Temp\schm_azspc\specification\nginx\resource-manager\readme.md

WARNING: AutoRest has not been tested with Node versions greater than v14.

AutoRest code generation utility [cli version: 3.3.2; node: v16.6.2] (C) 2018 Microsoft Corporation. https://aka.ms/autorest NOTE: AutoRest core version selected from configuration: 3.0.6374.

There is a new version of AutoRest available (3.6.1).

You can install the newer version with with npm install -g autorest@latest

Loading AutoRest core 'C:\Users\limgu.autorest\@autorest_core@3.0.6374\node_modules\@autorest\core\dist' (3.0.6374) Loading AutoRest extension '@autorest/azureresourceschema' (3.0.92->3.0.92) [1.72 s] Generation Complete

stephaniezyen commented 2 years ago

@leni-msft @jorgecotillo @apclouds Lei, do you know if we are restricting non-Microsoft namespaces from autogeneration?

anthony-c-martin commented 2 years ago

This is most likely being excluded because of this: https://github.com/Azure/azure-resource-manager-schemas/blob/bf511e5f01891144d4055ac15044e2d0cb1b85fb/generator/constants.ts#L12

limingu commented 2 years ago

Thanks, @anthony-c-martin! That explained why the auto generation does nothing. Any suggestion how we can fix it? This is blocking NGINX.NGINXPLUS to auto generate the schemas.