Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Onboard msi for autogeneration #764

Closed
wants to merge 4 commits into from
Closed

Onboard msi for autogeneration #764

wants to merge 4 commits into from

Conversation

anthony-c-martin
Copy link
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
================================================================================================================================

generator/whitelist.ts Show resolved Hide resolved
}
},
"required": [
"name",
"type",
"apiVersion",
"location"

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
Member Author

Choose a reason for hiding this comment

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

Copy link

Choose a reason for hiding this comment

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

Copy link
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

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

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.

schemas/2015-08-31-preview/Microsoft.ManagedIdentity.json Outdated Show resolved Hide resolved
schemas/2015-08-31-preview/Microsoft.ManagedIdentity.json Outdated Show resolved Hide resolved
@rikotcho
Copy link

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.

4 participants