Skip to content

Commit 2c16780

Browse files
committed
fixup! Support references in assert_operation_response/2
1 parent 95bef39 commit 2c16780

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

test/support/api_spec.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ defmodule OpenApiSpexTest.ApiSpec do
7676
}
7777
},
7878
responses: %{
79-
unprocessable_entity: %Response{
79+
"unprocessable_entity" => %Response{
8080
description: "Unprocessable Entity",
8181
content: %{"application/json" => %MediaType{schema: %Schema{type: :object}}}
8282
}

test/support/pet_controller.ex

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ defmodule OpenApiSpexTest.PetController do
4747
],
4848
responses: [
4949
ok: {"Pet list", "application/json", Schemas.PetsResponse},
50-
unprocessable_entity: OpenApiSpex.JsonErrorResponse.response()
50+
unprocessable_entity: %OpenApiSpex.Reference{
51+
"$ref": "#/components/responses/unprocessable_entity"
52+
}
5153
],
5254
operation_id: "listPets"
5355
def index(conn, _params) do

0 commit comments

Comments
 (0)