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

Plugin llcsharp-v2 reported failure #1231

Open
2 tasks done
soroshsabz opened this issue Aug 18, 2023 · 0 comments
Open
2 tasks done

Plugin llcsharp-v2 reported failure #1231

soroshsabz opened this issue Aug 18, 2023 · 0 comments
Labels
customer-reported question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@soroshsabz
Copy link

soroshsabz commented Aug 18, 2023

Before filling a bug

  • have you checked the faq for known issues.
  • have you checked existing issues

Describe the bug

I have project in BSVN/IpTables.Api#22

and I want to generate Cli with autorest for my BSN.IpTables.Api

I run below commands

autorest --powershell --input-file:"../BSN.IpTables.Api/swagger.json" --verbose

and I see below errors

   BSN.IpTables.Cli   Feature/22-add-cli≡  .\Generate-PowerShellClient.ps1                                     

changed 1 package in 1s
AutoRest code generation utility [cli version: 3.6.3; node: v18.15.0]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
info    |    Loading AutoRest core      'C:\Users\sooro\.autorest\@[email protected]\nodemodules\@autorest\core\dist' (3.9.7)
verbose | [0.41 s] No configuration found at 'file:///D:/Source/Repos/Resa/IpTables.Api/Source/BSN.IpTables.Cli/'.
verbose | [0.42 s]    Including configuration file 'file:///C:/Users/sooro/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/default-configuration.md'
verbose | [0.43 s]    Including configuration file 'file:///C:/Users/sooro/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/inspect.md'
verbose | [0.43 s]    Including configuration file 'file:///C:/Users/sooro/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/directives.md'
verbose | [0.44 s]    Including configuration file 'file:///C:/Users/sooro/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/pipeline.md'
verbose | [0.44 s]    Including configuration file 'file:///C:/Users/sooro/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/loader-openapi.md'
verbose | [0.45 s]    Including configuration file 'file:///C:/Users/sooro/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/miscellaneous.md'
verbose | [0.45 s]    Including configuration file 'file:///C:/Users/sooro/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/plugin-powershell.md'
verbose | [0.46 s]    Including configuration file 'file:///C:/Users/sooro/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/plugin-azureresourceschema.md'
verbose | [0.47 s]    Including configuration file 'file:///C:/Users/sooro/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/plugin-csharp.md'
verbose | [0.47 s]    Including configuration file 'file:///C:/Users/sooro/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/plugin-go.md'
verbose | [0.48 s]    Including configuration file 'file:///C:/Users/sooro/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/plugin-java.md'
verbose | [0.49 s]    Including configuration file 'file:///C:/Users/sooro/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/plugin-nodejs.md'
verbose | [0.50 s]    Including configuration file 'file:///C:/Users/sooro/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/plugin-php.md'
verbose | [0.50 s]    Including configuration file 'file:///C:/Users/sooro/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/plugin-python.md'
verbose | [0.51 s]    Including configuration file 'file:///C:/Users/sooro/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/plugin-ruby.md'
verbose | [0.51 s]    Including configuration file 'file:///C:/Users/sooro/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/plugin-typescript.md'
verbose | [0.52 s]    Including configuration file 'file:///C:/Users/sooro/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/plugin-validators.md'
verbose | [0.53 s]    Including configuration file 'file:///C:/Users/sooro/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/plugin-az.md'
verbose | [0.53 s]    Including configuration file 'file:///C:/Users/sooro/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/plugin-terraform.md'
verbose | [0.54 s]    Including configuration file 'file:///C:/Users/sooro/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/plugin-azure-functions.md'
verbose | [0.55 s]    Including configuration file 'file:///C:/Users/sooro/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/plugin-openapi-to-cadl.md'
verbose | [0.56 s]    Including configuration file 'file:///C:/Users/sooro/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/graphs.md'
verbose | [0.57 s]    Including configuration file 'file:///C:/Users/sooro/.autorest/@[email protected]/nodemodules/@autorest/core/dist/resources/help-configuration.md'
info    |
The default version of @autorest/powershell has been bumped from 2.1+ to 3.0+.
 > If you still want to use 2.1+ version, please specify it with --use:@autorest/powershell@2.1.{x}, e.g 2.1.401.

info    |    Loading AutoRest extension '@autorest/powershell' (~3.0.0->3.0.505)
verbose | [0.60 s]    Including extension configuration file 'file:///C:/Users/sooro/.autorest/@[email protected]/nodemodules/@autorest/powershell/readme.md'
verbose | [0.60 s]    Including configuration file 'file:///C:/Users/sooro/.autorest/@[email protected]/nodemodules/@autorest/powershell/readme.md'
verbose | [0.61 s]    Including configuration file 'file:///C:/Users/sooro/.autorest/@[email protected]/nodemodules/@autorest/powershell/autorest-configuration.md'
info    |    Loading AutoRest extension '@autorest/modelerfour' (4.15.414->4.15.414)
verbose | [0.66 s]    Including extension configuration file 'file:///C:/Users/sooro/.autorest/@[email protected]/nodemodules/@autorest/modelerfour/readme.md'
verbose | [0.66 s]    Including configuration file 'file:///C:/Users/sooro/.autorest/@[email protected]/nodemodules/@autorest/modelerfour/readme.md'
verbose | [1.16 s] Reading OpenAPI 3.0 file file:///D:/Source/Repos/Resa/IpTables.Api/Source/BSN.IpTables.Api/swagger.json
warning | PreCheck/AllOfWhenYouMeantRef | Schema 'IpTablesChainSetViewModelResponse-statusCode' is using an 'allOf' instead of a $ref. This creates a wasteful anonymous type when generating code.
warning | PreCheck/AllOfWhenYouMeantRef | Schema 'IpTablesChainSetViewModelResponse-data' is using an 'allOf' instead of a $ref. This creates a wasteful anonymous type when generating code.
warning | PreCheck/AllOfWhenYouMeantRef | Schema 'IpTablesChainViewModel-ipVersion' is using an 'allOf' instead of a $ref. This creates a wasteful anonymous type when generating code.
warning | PreCheck/AllOfWhenYouMeantRef | Schema 'Response-statusCode' is using an 'allOf' instead of a $ref. This creates a wasteful anonymous type when generating code.
warning | PreCheck/AllOfWhenYouMeantRef | Schema 'paths·1h07bfn·api-v1-home-insert·put·parameters·0·schema' is using an 'allOf' instead of a $ref. This creates a wasteful anonymous type when generating code.
warning | PreCheck/AllOfWhenYouMeantRef | Schema 'paths·bha41k·api-v1-rules-insert·put·parameters·0·schema' is using an 'allOf' instead of a $ref. This creates a wasteful anonymous type when generating code.
warning | PreCheck/AllOfWhenYouMeantRef | Schema 'paths·1yxlpcs·api-v1-insert·put·parameters·0·schema' is using an 'allOf' instead of a $ref. This creates a wasteful anonymous type when generating code.
warning | PreCheck/SchemaMissingType | The schema 'IpTablesChainSetViewModelResponse-statusCode' with an undefined type and 'allOf'/'anyOf'/'oneOf' is a bit ambigious. This has been auto-corrected to 'type:object'
warning | PreCheck/SchemaMissingType | The schema 'IpTablesChainSetViewModelResponse-data' with an undefined type and 'allOf'/'anyOf'/'oneOf' is a bit ambigious. This has been auto-corrected to 'type:object'
warning | PreCheck/SchemaMissingType | The schema 'IpTablesChainViewModel-ipVersion' with an undefined type and 'allOf'/'anyOf'/'oneOf' is a bit ambigious. This has been auto-corrected to 'type:object'
warning | PreCheck/SchemaMissingType | The schema 'Response-statusCode' with an undefined type and 'allOf'/'anyOf'/'oneOf' is a bit ambigious. This has been auto-corrected to 'type:object'
warning | PreCheck/SchemaMissingType | The schema 'paths·1h07bfn·api-v1-home-insert·put·parameters·0·schema' with an undefined type and 'allOf'/'anyOf'/'oneOf' is a bit ambigious. This has been auto-corrected to 'type:object'
warning | PreCheck/SchemaMissingType | The schema 'paths·bha41k·api-v1-rules-insert·put·parameters·0·schema' with an undefined type and 'allOf'/'anyOf'/'oneOf' is a bit ambigious. This has been auto-corrected to 'type:object'
warning | PreCheck/SchemaMissingType | The schema 'paths·1yxlpcs·api-v1-insert·put·parameters·0·schema' with an undefined type and 'allOf'/'anyOf'/'oneOf' is a bit ambigious. This has been auto-corrected to 'type:object'
warning | PreCheck/CheckDuplicateSchemas | Checking for duplicate schemas, this could take a (long) while.  Run with --verbose for more detail.
verbose | [1.37 s]   ModelerFour/api-version-mode:client
verbose | [1.37 s]   ModelerFour/api-version-parameter:constant
verbose | [1.37 s]   ModelerFour/use-model-namespace:false
warning | Interpretations | Generating 'operationId' for 'get' operation on path '/api/v1/Home/List'
warning | Interpretations | Generating 'operationId' for 'get' operation on path '/api/v1/rules/List'
warning | Interpretations | Generating 'operationId' for 'get' operation on path '/api/v1/List'
warning | Interpretations | Generating 'operationId' for 'put' operation on path '/api/v1/Home/Insert'
warning | Interpretations | Generating 'operationId' for 'put' operation on path '/api/v1/rules/Insert'
warning | Interpretations | Generating 'operationId' for 'put' operation on path '/api/v1/Insert'
warning | Interpretations | Generating 'operationId' for 'post' operation on path '/api/v1/Home/Append'
warning | Interpretations | Generating 'operationId' for 'post' operation on path '/api/v1/rules/Append'
warning | Interpretations | Generating 'operationId' for 'post' operation on path '/api/v1/Append'
warning | Interpretations | Generating 'operationId' for 'delete' operation on path '/api/v1/Home/Delete'
warning | Interpretations | Generating 'operationId' for 'delete' operation on path '/api/v1/rules/Delete'
warning | Interpretations | Generating 'operationId' for 'delete' operation on path '/api/v1/Delete'
warning | Interpretations | Generating 'operationId' for 'delete' operation on path '/api/v1/Home'
warning | Interpretations | Generating 'operationId' for 'delete' operation on path '/api/v1/rules'
warning | Interpretations | Generating 'operationId' for 'delete' operation on path '/api/v1'
C:\Users\sooro\.autorest\@autorest_powershell@3.0.505\node_modules\@autorest\powershell\dist\plugins\llcsharp-v2.js - TypeError: Cannot read properties of undefined (reading 'fullName')
    at ModelClass.handleAllOf (C:\Users\sooro\.autorest\@autorest_powershell@3.0.505\node_modules\@autorest\powershell\llcsharp\model\model-class.ts:413:37)
    at new ModelClass (C:\Users\sooro\.autorest\@autorest_powershell@3.0.505\node_modules\@autorest\powershell\llcsharp\model\model-class.ts:142:15)
    at ModelsNamespace.NewResolveTypeDeclaration (C:\Users\sooro\.autorest\@autorest_powershell@3.0.505\node_modules\@autorest\powershell\llcsharp\model\namespace.ts:104:67)
    at new ModelsNamespace (C:\Users\sooro\.autorest\@autorest_powershell@3.0.505\node_modules\@autorest\powershell\llcsharp\model\namespace.ts:53:14)
    at Project.init (C:\Users\sooro\.autorest\@autorest_powershell@3.0.505\node_modules\@autorest\powershell\llcsharp\project.ts:85:28)
    at llcsharpV2 (C:\Users\sooro\.autorest\@autorest_powershell@3.0.505\node_modules\@autorest\powershell\plugins\llcsharp-v2.ts:18:21)
    at C:\Users\sooro\.autorest\@autorest_powershell@3.0.505\node_modules\@azure-tools\autorest-extension-base\extension-base.ts:68:9/Cannot read properties of undefined (reading 'fullName')
fatal   | TypeError: Cannot read properties of undefined (reading 'fullName')
fatal   | Process() cancelled due to failure
error   |   Error: Plugin llcsharp-v2 reported failure.
error   | Autorest completed with an error. If you think the error message is unclear, or is a bug, please declare an issues at https://github.com/Azure/autorest/issues with the error message you are seeing.

Expected behavior
I expect create PowerShell module for my project

Additional context
if you want additional information please say to me

@microsoft-github-policy-service microsoft-github-policy-service bot added customer-reported question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Aug 18, 2023
@timotheeguerin timotheeguerin transferred this issue from Azure/autorest Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-reported question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

1 participant