Skip to content

Commit

Permalink
add missing message property to schema
Browse files Browse the repository at this point in the history
  • Loading branch information
dealloc committed Mar 4, 2024
1 parent 2797595 commit 366a7ed
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions lib/helldivers_2_web/schemas/global_event_schema.ex
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,15 @@ defmodule Helldivers2Web.Schemas.GlobalEventSchema do
require OpenApiSpex

@doc "Generates a schema for a single homeworld schema response"
def response(), do: {"Global event response", "application/json", __MODULE__, Helldivers2Web.ApiSpec.default_options()}
def response(),
do:
{"Global event response", "application/json", __MODULE__,
Helldivers2Web.ApiSpec.default_options()}

def responses(), do: {"Global events response", "application/json", %Schema{type: :array, items: __MODULE__}, Helldivers2Web.ApiSpec.default_options()}
def responses(),
do:
{"Global events response", "application/json", %Schema{type: :array, items: __MODULE__},
Helldivers2Web.ApiSpec.default_options()}

OpenApiSpex.schema(%{
description: "Contains information about a global event, past and present",
Expand All @@ -30,6 +36,15 @@ defmodule Helldivers2Web.Schemas.GlobalEventSchema do
description:
"Internal identifier of the title, this always remains the same regardless of language"
},
message: %Schema{
type: :string,
description: "The message from Super Earth about the global event"
},
message_id_32: %Schema{
type: :integer,
description:
"Internal identifier of the message, this always remains the same regardless of language"
},
race: %Schema{
type: :string,
description: "The race involved in this campaign (so far seems to always be 'Human')"
Expand Down

0 comments on commit 366a7ed

Please sign in to comment.