Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo. #635

Merged
merged 1 commit into from
Sep 12, 2024
Merged

Fix typo. #635

merged 1 commit into from
Sep 12, 2024

Conversation

loguntsov
Copy link
Contributor

I found this typo because my code doesn't work with valid OpenApi file.

10:56:08.878 pid=<0.3186.0> module=Df.Diagram.Component.Config line=95 [warning] ** (FunctionClauseError) no function clause matching in anonymous fn/1 in OpenApiSpex.OpenApi.Decode.add_extensions/2
    (open_api_spex 3.19.1) lib/open_api_spex/open_api/decode.ex:466: anonymous fn(%{"description" => "production", "url" => "https://trexity.app/storage"}) in OpenApiSpex.OpenApi.Decode.add_extensions/2
    (elixir 1.17.2) lib/enum.ex:4301: Enum.filter_list/2
    (open_api_spex 3.19.1) lib/open_api_spex/open_api/decode.ex:466: OpenApiSpex.OpenApi.Decode.add_extensions/2
    (elixir 1.17.2) lib/map.ex:916: Map.update!/3
    (open_api_spex 3.19.1) lib/open_api_spex/open_api/decode.ex:295: OpenApiSpex.OpenApi.Decode.to_struct/2
    (elixir 1.17.2) lib/map.ex:916: Map.update!/3
    (open_api_spex 3.19.1) lib/open_api_spex/open_api/decode.ex:403: OpenApiSpex.OpenApi.Decode.to_struct/2
    (open_api_spex 3.19.1) lib/open_api_spex/open_api/decode.ex:418: anonymous fn/1 in OpenApiSpex.OpenApi.Decode.to_struct/2
    (elixir 1.17.2) lib/map.ex:257: Map.do_map/2
    (elixir 1.17.2) lib/map.ex:257: Map.do_map/2
    (elixir 1.17.2) lib/map.ex:251: Map.new_from_map/2
    (elixir 1.17.2) lib/map.ex:916: Map.update!/3
    (open_api_spex 3.19.1) lib/open_api_spex/open_api/decode.ex:39: OpenApiSpex.OpenApi.Decode.decode/1

@zorbash
Copy link
Contributor

zorbash commented Sep 11, 2024

Hi @loguntsov thanks for reporting this. Would it be possible to provide an OAS to reproduce the issue or add a test?

@loguntsov
Copy link
Contributor Author

@zorbash actually it was this file: https://github.com/trexitycode/openapi/blob/main/dist/v1.json#L3295
the line similar on 3295 caused crash.

@zorbash
Copy link
Contributor

zorbash commented Sep 12, 2024

Thanks @loguntsov

@zorbash zorbash merged commit 30d34c9 into open-api-spex:master Sep 12, 2024
8 checks passed
zorbash added a commit that referenced this pull request Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants