-
Notifications
You must be signed in to change notification settings - Fork 193
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
OpenApiSpex.PathItem.from_routes breaks the contract #540
Comments
Can we make Something like: @type route ::
%{optional(:path) => String.t(), verb: atom, plug: atom, opts: any}
| %{optional(:path) => String.t(), verb: atom, plug: atom, plug_opts: any} |
Applied the suggestion #540 (comment) in the example app and it does fix the issue. @David-Klemenc Please confirm it fixes the issue for your application as well. |
Yes this solves the problem for me too. I was looking at the example code - and was thinking of rewriting it so it uses mnesia instead of sqlite, this would get rid of a couple of dependencies and make it a bit easier to run and maintain? (the rewrite to mensia would be easy since there is no pagination in the examples). Would you like me to try this? |
@David-Klemenc Which mix dependencies would we get rid of? With SQLite becoming more popular in the Elixir ecosystem (source) it's probably a good idea to use it in the example app. |
@zorbash these two: {:ecto, "~> 2.2"},
{:sqlite_ecto2, "~> 2.4"}, Maybe you are correct - my thought was here we want to demonstrate the open_api part? (but in case someone uses the example as a seed - then ecto would be more appropriate) It is a slightly higher barrier to entry with ecto. |
It would be helpful to regenerate the example phoenix app using a recent version of the phoenix generator.
The example plug app can probably be updated to ecto 3 and sqlite_ecto3 without too much change. Eventually it would be great to have an example of marshalling |
Dialyzer is saying that this breaks the contract:
Which is correct, because the path type is defined as:
in v3.16.1 it was defined as:
The problem was introduced here: 534
A more full example:
The text was updated successfully, but these errors were encountered: