Process crashes for large schema
I'm trying to run cli with bitbucket OpenAPI schema from
https://dac-static.atlassian.com/cloud/bitbucket/swagger.v3.json?_v=2.300.114-0.1324.0
This is large file even browser takes a while to format this schema in readable json.
When using this with restish it crashes with following error.
runtime: goroutine stack exceeds 1000000000-byte limit
runtime: sp=0xc092c80318 stack=[0xc092c80000, 0xc0b2c80000]
fatal error: stack overflow
I have tried reducing this schema to only specific to my required tags with following but still it is crashing with similar error. So I'm not sure what is wrong here
jq '.paths|= with_entries( select (.value |to_entries[0] |select( .value.tags? |any(.=="Pipelines"))))' schema.json > ~/mini-schema.json
My env
go version go1.24.5 darwin/amd64
restish version dev-2025-07-24-17:33
Thanks in advance
That link doesn't load, can you attach the mini-schema you mention using?
Source schema link is available on this page https://developer.atlassian.com/cloud/bitbucket/rest/intro/#authentication
You can also find files dumped at https://gist.github.com/sunnyagain/51b3a15715029f42473e0c34a24f06f2/revisions
Thank you!
@sunnyagain I think i may have found the issue, could you give my fix a try?
@terev Thank you for your fix.
I have tried this patch and can confirm it works.
I hope this gets merged.
https://asciinema.org/a/732029
Thanks again!