mirror of
https://github.com/usetrmnl/trmnl-api.git
synced 2026-04-29 13:35:13 -07:00
Added category contract
Necessary to validate the Contracts API response. Milestone: minor
This commit is contained in:
@@ -20,6 +20,7 @@ module TRMNL
|
||||
end
|
||||
|
||||
namespace :contracts do
|
||||
register :category, Contracts::Category
|
||||
register :current_screen, Contracts::CurrentScreen
|
||||
register :display, Contracts::Display
|
||||
register :firmware, Contracts::Firmware
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "dry/schema"
|
||||
|
||||
module TRMNL
|
||||
module API
|
||||
module Contracts
|
||||
# Validates API response.
|
||||
Category = Dry::Schema.JSON { required(:data).array(:string) }
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user