(BadMapError) expected a map, got: nil for Meilisearch spec
Opened this issue · 0 comments
varunbpatil commented
Trying to use this generator on the Meilisearch API spec - https://raw.githubusercontent.com/meilisearch/open-api/main/open-api.yaml results in the following error:
** (BadMapError) expected a map, got: nil
:erlang.map_get("name", nil)
(oapi_generator 0.2.0) lib/open_api/spec/path/parameter.ex:51: OpenAPI.Spec.Path.Parameter.decode/2
(oapi_generator 0.2.0) lib/open_api/reader/state.ex:156: OpenAPI.Reader.State.with_ref/3
(oapi_generator 0.2.0) lib/open_api/reader/state.ex:111: OpenAPI.Reader.State.with_path/4
(oapi_generator 0.2.0) lib/open_api/spec/path/operation.ex:108: anonymous fn/2 in OpenAPI.Spec.Path.Operation.decode_parameters/2
(elixir 1.17.2) lib/enum.ex:2531: Enum."-reduce/3-lists^foldl/2-0-"/3
(oapi_generator 0.2.0) lib/open_api/reader/state.ex:111: OpenAPI.Reader.State.with_path/4
(oapi_generator 0.2.0) lib/open_api/spec/path/operation.ex:60: OpenAPI.Spec.Path.Operation.decode/2
(oapi_generator 0.2.0) lib/open_api/reader/state.ex:111: OpenAPI.Reader.State.with_path/4
(oapi_generator 0.2.0) lib/open_api/spec/path/item.ex:46: OpenAPI.Spec.Path.Item.decode/2
(oapi_generator 0.2.0) lib/open_api/reader/state.ex:111: OpenAPI.Reader.State.with_path/4
(oapi_generator 0.2.0) lib/open_api/spec.ex:147: anonymous fn/2 in OpenAPI.Spec.decode_paths/2
(stdlib 4.3.1.4) maps.erl:411: :maps.fold_1/3
(oapi_generator 0.2.0) lib/open_api/reader/state.ex:111: OpenAPI.Reader.State.with_path/4
(oapi_generator 0.2.0) lib/open_api/spec.ex:74: OpenAPI.Spec.decode/2
(elixir 1.17.2) lib/enum.ex:2531: Enum."-reduce/3-lists^foldl/2-0-"/3
(oapi_generator 0.2.0) lib/open_api/reader.ex:104: OpenAPI.Reader.run/1
(oapi_generator 0.2.0) lib/open_api.ex:49: OpenAPI.run/2
(mix 1.17.2) lib/mix/task.ex:495: anonymous fn/3 in Mix.Task.run_task/5
(mix 1.17.2) lib/mix/cli.ex:96: Mix.CLI.run_task/2
Just starting off with Elixir and not sure how to debug. Any help will be much appreciated.