Skip to content

Onboard msi for autogeneration#764

Closed
anthony-c-martin wants to merge 4 commits intoAzure:masterfrom
anthony-c-martin:onboard_msi
Closed

Onboard msi for autogeneration#764
anthony-c-martin wants to merge 4 commits intoAzure:masterfrom
anthony-c-martin:onboard_msi

Conversation

@anthony-c-martin
Copy link
Copy Markdown
Member

> azure-schema-generator@1.0.0 generate-single /Users/antm88/Desktop/azure-resource-manager-schemas/generator
> ts-node cmd/generatesingle "msi/resource-manager"

[/var/folders/5w/v8v7tygs23v8cmtnvj1r02dc0000gn/T/schm_azspc] executing: git fsck
[/var/folders/5w/v8v7tygs23v8cmtnvj1r02dc0000gn/T/schm_azspc] executing: git clone [/var/folders/5w/v8v7tygs23v8cmtnvj1r02dc0000gn/T/schm_azspc] executing: git reset -q .
[/var/folders/5w/v8v7tygs23v8cmtnvj1r02dc0000gn/T/schm_azspc] executing: git checkout -q -- .
[/var/folders/5w/v8v7tygs23v8cmtnvj1r02dc0000gn/T/schm_azspc] executing: git clean -q -fd
[/var/folders/5w/v8v7tygs23v8cmtnvj1r02dc0000gn/T/schm_azspc] executing: git gc
[/var/folders/5w/v8v7tygs23v8cmtnvj1r02dc0000gn/T/schm_azspc] executing: git fetch
[/var/folders/5w/v8v7tygs23v8cmtnvj1r02dc0000gn/T/schm_azspc] executing: git checkout -q origin/master
[/Users/antm88/Desktop/azure-resource-manager-schemas/generator] executing: autorest-beta --azureresourceschema --azureresourceschema.multi-scope=true --output-folder=/var/folders/5w/v8v7tygs23v8cmtnvj1r02dc0000gn/T/2xs0e4nsa8f --tag=all-api-versions --api-version=2015-08-31-preview --title=none /var/folders/5w/v8v7tygs23v8cmtnvj1r02dc0000gn/T/schm_azspc/specification/msi/resource-manager/readme.md

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

AutoRest code generation utility [version: 3.0.6116; node: v12.4.0, max-memory: 8192 gb]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
   Loading AutoRest core      '/Users/antm88/Desktop/azure-resource-manager-schemas/generator/node_modules/@autorest/core/dist' (3.0.6121)
   Loading local AutoRest extension '@autorest/azureresourceschema' (/Users/antm88/Desktop/azure-resource-manager-schemas/generator/node_modules/@autorest/azureresourceschema)
[23.12 s] Generation Complete
Shutting Down
================================================================================================================================
Filename: /Users/antm88/Desktop/azure-resource-manager-schemas/schemas/2015-08-31-preview/Microsoft.ManagedIdentity.json
Provider Namespace: Microsoft.ManagedIdentity
API Version: 2015-08-31-preview
Resource Types (Resource Group Scope):
- userAssignedIdentities
================================================================================================================================
[/Users/antm88/Desktop/azure-resource-manager-schemas/generator] executing: autorest-beta --azureresourceschema --azureresourceschema.multi-scope=true --output-folder=/var/folders/5w/v8v7tygs23v8cmtnvj1r02dc0000gn/T/npp4pupewsk --tag=all-api-versions --api-version=2018-11-30 --title=none /var/folders/5w/v8v7tygs23v8cmtnvj1r02dc0000gn/T/schm_azspc/specification/msi/resource-manager/readme.md

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

AutoRest code generation utility [version: 3.0.6116; node: v12.4.0, max-memory: 8192 gb]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
   Loading AutoRest core      '/Users/antm88/Desktop/azure-resource-manager-schemas/generator/node_modules/@autorest/core/dist' (3.0.6121)
   Loading local AutoRest extension '@autorest/azureresourceschema' (/Users/antm88/Desktop/azure-resource-manager-schemas/generator/node_modules/@autorest/azureresourceschema)
[27.28 s] Generation Complete
Shutting Down
================================================================================================================================
Filename: /Users/antm88/Desktop/azure-resource-manager-schemas/schemas/2018-11-30/Microsoft.ManagedIdentity.json
Provider Namespace: Microsoft.ManagedIdentity
API Version: 2018-11-30
Resource Types (Resource Group Scope):
- userAssignedIdentities
================================================================================================================================

Comment thread generator/whitelist.ts
"name",
"type",
"apiVersion",
"location"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is location being removed from the required properties?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I move the "required" field from the Identity definition to the Resource definition, the schema is correctly generated with location as required.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, we have a PR that should address that, using Azure common types: Azure/azure-rest-api-specs#8352

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anthony-c-martin can you try to regenerate? We've updated our swagger to use Azure common types definitions.

Comment thread schemas/2015-08-31-preview/Microsoft.ManagedIdentity.json Outdated
Comment thread schemas/2015-08-31-preview/Microsoft.ManagedIdentity.json Outdated
@rikotcho
Copy link
Copy Markdown

Thanks for the info Anthony. We are looking at making the needed updates to our swagger now. After that we can regenerate the changes in this PR (before merging).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants