-
Notifications
You must be signed in to change notification settings - Fork 196
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
Add examples property to Schema #654
Conversation
ab4e92f
to
9833031
Compare
@@ -103,6 +103,10 @@ defmodule OpenApiSpex.SchemaTest do | |||
assert Schema.example(%Schema{type: :string, example: "foo"}) == "foo" | |||
end | |||
|
|||
test "uses the first value in `examples` property when not nil" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[note] Returning the first value seems consistent with how https://editor-next.swagger.io/ generates examples.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a dialyzer error which can be addressed with https://github.com/open-api-spex/open_api_spex/pull/654/files#r1978005779
I am at loss about this test failure. It only happens on one square of the test matrix, and on something that doesn't look related to the changes. Do you have an idea what could be happening here? Otherwise, I can try to reproduce that environment and debug this. |
It's an unrelated flaky test. |
Thanks! |
Fixes #653