Can't generate from Slack API
Describe the bug When running a server from the published slack api, error is
OpenAPI-to-GraphQL creation event error: (Patchable) schema type must not be an array
To Reproduce Steps to reproduce the behavior:
wget https://raw.githubusercontent.com/slackapi/slack-api-specs/master/web-api/slack_web_openapi_v2.json
npx openapi-to-graphql-cli slack_web_openapi_v2.json
Expected behavior Server should start.
A better error message would also work? The error suggests that the schema is patchable, but how?
Thanks for reporting this issue! Actually, I am not sure what this error message means either. To be honest, I am quite backed up with a lot of work. If you would like to investigate this problem and help contribute to OtG, then I can get you started. In any case, thanks for reporting the issue.
Guesses as to where its coming from? It doesn't seem to come from this project or graphql from a dumb sting matching search.
Error was thrown by swagger2openapi.
Can be "fixed" by adding a patch: true to the conversion step
await Swagger2OpenAPI.convertObj(spec, { patch: true })
or, from the cli until a PR is made
npx swagger2openapi -p slack_web_openapi_v2.json --output slack_web_openapi_v2_patched.json
Once that goes through, the def falls through to the anyOf problem fixed by #232
I'm also not very familiar with swagger so I'm uncertain of the consequences of auto-patching. Any ideas?
Hey! Thanks for starting to look into it! Unfortunately, I am at a conference right now and it’s difficult for me to check until later today. Thanks for being proactive!
Do we still anyone looking into this ? I could take a look at it and see how best to include the { patch : true } config optionally.
@isocroft I don't think anyone is looking into this right now. If you want to give it a go, that would be amazing!