File size: 586 Bytes
88211d3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
defmodule PlausibleWeb.Plugins.API.Schemas.CustomProp do
  @moduledoc """
  OpenAPI schema for Goal
  """
  use PlausibleWeb, :open_api_schema

  OpenApiSpex.schema(%{
    title: "CustomProp",
    description: "Custom Property object",
    type: :object,
    required: [:custom_prop],
    properties: %{
      custom_prop: %Schema{
        type: :object,
        required: [:key],
        properties: %{
          key: %Schema{type: :string, description: "Custom Property Key"}
        }
      }
    },
    example: %{
      custom_prop: %{
        key: "author"
      }
    }
  })
end