analytics / lib /plausible_web /plugins /api /schemas /goal /custom_props.ex
Leon4gr45's picture
Upload folder using huggingface_hub (part 3)
88211d3 verified
Raw
History Blame Contribute Delete
615 Bytes
defmodule PlausibleWeb.Plugins.API.Schemas.Goal.CustomProps do
@moduledoc """
Reusable OpenAPI schema definitions for Custom Properties in Goals
"""
alias OpenApiSpex.Schema
def response_schema do
%Schema{
type: :object,
description: "Custom properties (string keys and values)",
additionalProperties: %Schema{type: :string},
readOnly: true
}
end
def request_schema do
%Schema{
type: :object,
description: "Custom properties (max 3, string keys and values)",
additionalProperties: %Schema{type: :string},
maxProperties: 3
}
end
end