Skip to content

Commit 844f24a

Browse files
author
Aleksandr Lossenko
authoredFeb 13, 2024
Relax dependency constraint on ymlr to allow version ~> 5.0 (open-api-spex#586)
* relax dependency on ymlr, and fix some tests * test with more elixir versions
1 parent d9cfffe commit 844f24a

File tree

4 files changed

+15
-6
lines changed

4 files changed

+15
-6
lines changed
 

‎.github/workflows/elixir.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,17 @@ jobs:
6565
name: Test (OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}})
6666
strategy:
6767
matrix:
68-
otp: ['22', '23', '24', '25']
69-
elixir: ['1.11', '1.12', '1.13']
68+
otp: ['22', '23', '24', '25', '26']
69+
elixir: ['1.11', '1.12', '1.13', '1.14', '1.15', '1.16']
7070
exclude:
7171
- {otp: '25', elixir: '1.10'}
7272
- {otp: '25', elixir: '1.11'}
7373
- {otp: '25', elixir: '1.12'}
74+
- {otp: '26', elixir: '1.10'}
75+
- {otp: '26', elixir: '1.11'}
76+
- {otp: '26', elixir: '1.12'}
77+
- {otp: '26', elixir: '1.13'}
78+
- {otp: '26', elixir: '1.14'}
7479
steps:
7580
- uses: actions/checkout@v2
7681
- uses: erlef/setup-beam@v1

‎mix.exs

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ defmodule OpenApiSpex.Mixfile do
7070
{:phoenix, "~> 1.3", only: [:dev, :test]},
7171
{:plug, "~> 1.7"},
7272
{:poison, "~> 3.0 or ~> 4.0 or ~> 5.0", optional: true},
73-
{:ymlr, "~> 2.0 or ~> 3.0 or ~> 4.0", optional: true}
73+
{:ymlr, "~> 2.0 or ~> 3.0 or ~> 4.0 or ~> 5.0", optional: true}
7474
]
7575
end
7676

‎test/cast/object_test.exs

+5-1
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,11 @@ defmodule OpenApiSpex.ObjectTest do
415415
}
416416
}
417417

418-
assert {:error, [error1, error2]} = cast(value: %{"age" => 0, "name" => "N"}, schema: schema)
418+
assert {:error, [_error1, _error2] = errors} =
419+
cast(value: %{"age" => 0, "name" => "N"}, schema: schema)
420+
421+
error1 = Enum.find(errors, &(&1.path == [:age]))
422+
error2 = Enum.find(errors, &(&1.path == [:name]))
419423

420424
assert %Error{} = error1
421425
assert error1.reason == :minimum

‎test/paths_test.exs

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ defmodule OpenApiSpex.PathsTest do
1515
refute Map.has_key?(paths, "/api/noapi")
1616
refute Map.has_key?(paths, "/api/noapi_with_struct")
1717

18-
assert pets_path_item.patch.operationId == "OpenApiSpexTest.PetController.update"
19-
assert pets_path_item.put.operationId == "OpenApiSpexTest.PetController.update (2)"
18+
assert pets_path_item.put.operationId == "OpenApiSpexTest.PetController.update"
19+
assert pets_path_item.patch.operationId == "OpenApiSpexTest.PetController.update (2)"
2020
end
2121
end
2222
end

0 commit comments

Comments
 (0)
Please sign in to comment.