defmodule GitHub.Repository.Advisory.Vulnerability do @moduledoc """ Provides struct and type for RepositoryAdvisoryVulnerability """ use GitHub.Encoder @type t :: %__MODULE__{ __info__: map, package: map | nil, patched_versions: String.t() | nil, vulnerable_functions: [String.t()] | nil, vulnerable_version_range: String.t() | nil } defstruct [ :__info__, :package, :patched_versions, :vulnerable_functions, :vulnerable_version_range ] @doc false @spec __fields__(atom) :: keyword def __fields__(type \\ :t) def __fields__(:t) do [ package: {:nullable, :map}, patched_versions: {:nullable, :string}, vulnerable_functions: {:nullable, {:array, :string}}, vulnerable_version_range: {:nullable, :string} ] end end