feat: add current room occupancy endpoint
This commit is contained in:
@@ -67,11 +67,13 @@ defmodule Localiser.Web.Schemas do
|
||||
OpenApiSpex.schema(%{
|
||||
title: "Tag", type: :object,
|
||||
properties: %{
|
||||
id: %Schema{type: :integer},
|
||||
tag_id: %Schema{type: :string},
|
||||
name: %Schema{type: :string}
|
||||
id: %Schema{type: :integer},
|
||||
tag_id: %Schema{type: :string},
|
||||
name: %Schema{type: :string},
|
||||
room_id: %Schema{type: :integer, nullable: true},
|
||||
last_seen: %Schema{type: :string, format: :"date-time", nullable: true}
|
||||
},
|
||||
required: [:id, :tag_id, :name]
|
||||
required: [:id, :tag_id, :name, :room_id, :last_seen]
|
||||
})
|
||||
end
|
||||
|
||||
@@ -303,6 +305,20 @@ defmodule Localiser.Web.Schemas do
|
||||
})
|
||||
end
|
||||
|
||||
defmodule TagOccupancy do
|
||||
require OpenApiSpex
|
||||
OpenApiSpex.schema(%{
|
||||
title: "TagOccupancy", type: :object,
|
||||
properties: %{
|
||||
id: %Schema{type: :integer},
|
||||
tag_id: %Schema{type: :string},
|
||||
name: %Schema{type: :string},
|
||||
room_id: %Schema{type: :integer, nullable: true}
|
||||
},
|
||||
required: [:id, :tag_id, :name, :room_id]
|
||||
})
|
||||
end
|
||||
|
||||
defmodule TagParams do
|
||||
require OpenApiSpex
|
||||
OpenApiSpex.schema(%{
|
||||
|
||||
Reference in New Issue
Block a user