autorest icon indicating copy to clipboard operation
autorest copied to clipboard

Unclear Error Message

Open cwray-tech opened this issue 2 years ago • 0 comments

Before filling a bug

  • [x] have you checked the faq for known issues.
  • [x] have you checked existing issues

Describe the bug I am getting the error:

fatal   | TypeError: Cannot read properties of undefined (reading 'schema')
fatal   | Process() cancelled due to failure
error   |   Error: Plugin modelerfour reported failure.

The issue is that it does not tell me where the error exists, and what is wrong with the openapi file.

Our autorest.md file:

input-file: storage/app/openapi.json
typescript: true
output-folder: ts-sdk
clear-output-folder: true
security: AzureKey

Comand run autorest autorest.md

Expected behavior The error should share the line where the error is coming from. More information should be shared so that we can address it.

Additional information

  • I'm also seeing a lot of warnings in the console when running the command like the below:
warning | Modeler/MissingType | The schema 'LeadGenRequest-form_params' has no type or format information whatsoever. Location:
   file:///home/chris/repos/sync-service/storage/app/openapi.json#/components/schemas/LeadGenRequest-form_params
  • I ran the openapi file through the swagger editor and fixed all semantic and structural problems with the file.

cwray-tech avatar Nov 10 '23 17:11 cwray-tech