Azure / Azure/autorest.cli

[MM] Maximum call stack size exceeded

Open
#96 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
8
Forks
18
PR merge metrics
No merged PRs in 30d

Description

I am generating `api.yaml` file using `autorest.cli` with input file: `azure-rest-api-specs\specification\policyinsights\resource-manager\readme.md`

# Tag in use
`package-2019-10`.

# Cli section added in `readme.md`

``` yaml $(cli)
cli:
cli-name: policyinsights
azure-arm: true
license-header: MICROSOFT_MIT_NO_VERSION
namespace: azure.mgmt.policyinsights
package-name: azure-mgmt-policyinsights
test-scenario:
- name: Query latest at management group scope
```

# Problem encountered

An error is reported as follows:
```
ERROR: ERROR RangeError: Maximum call stack size exceeded
at String.replace ()
at Object.ToSnakeCase (C:\Users\dapzhang\Documents\workspace\autorest.cli\dist\Common\Helpers.js:8:19)
at new ModuleOption (C:\Users\dapzhang\Documents\workspace\autorest.cli\dist\Common\ModuleMap.js:70:38)
at new ModuleOptionBody (C:\Users\dapzhang\Documents\workspace\autorest.cli\dist\Common\ModuleMap.js:114:9)
at MapGenerator.GetModelOptions (C:\Users\dapzhang\Documents\workspace\autorest.cli\dist\Common\MapGenerator.js:518:38)
at MapGenerator.GetModelOptions (C:\Users\dapzhang\Documents\workspace\autorest.cli\dist\Common\MapGenerator.js:529:50)
at MapGenerator.GetModelOptions (C:\Users\dapzhang\Documents\workspace\autorest.cli\dist\Common\MapGenerator.js:529:50)
at MapGenerator.GetModelOptions (C:\Users\dapzhang\Documents\workspace\autorest.cli\dist\Common\MapGenerator.js:529:50)
at MapGenerator.GetModelOptions (C:\Users\dapzhang\Documents\workspace\autorest.cli\dist\Common\MapGenerator.js:529:50)
at MapGenerator.GetModelOptions (C:\Users\dapzhang\Documents\workspace\autorest.cli\dist\Common\MapGenerator.js:529:50)
```

I am suspecting that the function `GetModelOptions` is nested to much levels.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.