-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
I tried to import this schema: https://github.com/Redocly/redoc/raw/refs/heads/main/demo/big-openapi.json
It failed with silent error.
After some tracing found the actual error:
compile:lint_module/2 -> {error,
{compile,[],".",[],[],".beam",[],[],
[binary],
[binary],
none,
[{[],
[{0,erl_lint,{unbound_var,'Headers'}},
{0,erl_lint,{unbound_var,'Headers'}},
{0,erl_lint,{unbound_var,'Extension'}},
{0,erl_lint,{unbound_var,'Headers'}},
{0,erl_lint,{unbound_var,'Headers'}},
{0,erl_lint,{unbound_var,'Headers'}},
{0,erl_lint,{unbound_var,'Headers'}},
{0,erl_lint,{unbound_var,...}},
{0,erl_lint,{...}}]}],
[{[],
[{0,erl_lint,{unused_var,'EventType'}},
{0,erl_lint,{unused_var,'EventType'}},
{0,erl_lint,{unused_var,'EventType'}},
{0,erl_lint,{unused_var,'EventType'}},
{0,erl_lint,{unused_var,'EventType'}},
{0,erl_lint,{unused_var,'Hash'}},
{0,erl_lint,{unused_var,...}},
{0,erl_lint,{...}},
{0,erl_lint,...},
{0,...},
{...}|...]}],
[]}}
Lots of errors, hard to fix.
I tried this schema instead: https://github.com/flussonic/openapi_handler/blob/master/test/flussonic-230127.json
After hacking openapi 3.1 support, I got the same {unbound_var,'Headers'}, but just one.
I removed one parameter and it worked:
@@ -15275,14 +15275,6 @@
"summary": "Get server config",
"description": "Method allows to fetch global server configuration and current runtime status.\n",
"parameters": [
- {
- "name": "Accept",
- "description": "Ask for `text/plain` to get original text config.\nBy default it will be `application/json`.\n",
- "in": "header",
- "schema": {
- "type": "string"
- }
- }
],
"responses": {
"200": {So, it looks like there are some troubles with parameters in headers.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
📑 TODO