Skip to content

Commit

Permalink
redacted operation doens't contains blank space
Browse files Browse the repository at this point in the history
  • Loading branch information
VitorVRS committed Jul 16, 2024
1 parent 19ffc49 commit 6bb5452
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/open_api_spex/paths.ex
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ defmodule OpenApiSpex.Paths do
rest
|> Enum.with_index(2)
|> Enum.map(fn {{path, verb, operation}, occurrence} ->
{path, verb, %{operation | operationId: "#{operation_id} (#{occurrence})"}}
{path, verb, %{operation | operationId: "#{operation_id}_#{occurrence}"}}
end)
end)
end
Expand Down
2 changes: 1 addition & 1 deletion test/paths_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ defmodule OpenApiSpex.PathsTest do
operation_ids = [pets_path_item.put.operationId, pets_path_item.patch.operationId]

assert "OpenApiSpexTest.PetController.update" in operation_ids
assert "OpenApiSpexTest.PetController.update (2)" in operation_ids
assert "OpenApiSpexTest.PetController.update_2" in operation_ids
end
end
end

0 comments on commit 6bb5452

Please sign in to comment.