This commit is contained in:
@@ -13,10 +13,6 @@ defmodule PolicyServiceWeb.PolicyController do
|
||||
tags(["Policies"])
|
||||
security([%{"bearerAuth" => []}])
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# GET /api/policies
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
operation(:index,
|
||||
summary: "List policies",
|
||||
parameters: [
|
||||
@@ -24,20 +20,24 @@ defmodule PolicyServiceWeb.PolicyController do
|
||||
"page[size]": [in: :query, type: :integer, required: false],
|
||||
filters: [
|
||||
in: :query,
|
||||
schema: %OpenApiSpex.Schema{
|
||||
required: false,
|
||||
explode: true,
|
||||
description: """
|
||||
Apply filters in Flop format.
|
||||
|
||||
Example: filters[0][field]=status&filters[0][op]==&filters[0][value]=created
|
||||
""",
|
||||
schema: %{
|
||||
type: :array,
|
||||
items: %OpenApiSpex.Schema{
|
||||
items: %{
|
||||
type: :object,
|
||||
properties: %{
|
||||
field: %OpenApiSpex.Schema{type: :string},
|
||||
op: %OpenApiSpex.Schema{type: :string, default: "=="},
|
||||
value: %OpenApiSpex.Schema{type: :string}
|
||||
field: %{type: :string, description: "Field to filter on"},
|
||||
op: %{type: :string, description: "Operator (e.g., ==, !=, ~>)"},
|
||||
value: %{type: :string, description: "Filter value"}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
required: false,
|
||||
style: :deepObject,
|
||||
explode: true
|
||||
],
|
||||
"order_by[]": [in: :query, type: :string, required: false]
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user