defmodule GitHub.Webhook.Config do
@moduledoc """
Provides struct and type for WebhookConfig
"""
use GitHub.Encoder
@type t :: %__MODULE__{
__info__: map,
content_type: String.t() | nil,
insecure_ssl: (number | String.t()) | nil,
secret: String.t() | nil,
url: String.t() | nil
}
defstruct [:__info__, :content_type, :insecure_ssl, :secret, :url]
@doc false
@spec __fields__(atom) :: keyword
def __fields__(type \\ :t)
def __fields__(:t) do
[
content_type: :string,
insecure_ssl: {:union, [:string, :number]},
secret: :string,
url: :string
]
end
end