Sha256: 0373d72cf91be0c09d8fb76eef8ecc4c84a1254713a781ffb3dbee1b80eed459

Contents?: true

Size: 363 Bytes

Versions: 11

Compression:

Stored size: 363 Bytes

Contents

# frozen_string_literal: true

module Mihari
  module Schemas
    Alert = Dry::Schema.Params do
      required(:rule_id).value(:string)
      required(:artifacts).value(array[:string])
      optional(:source).value(:string)
    end

    #
    # Alert schema contract
    #
    class AlertContract < Dry::Validation::Contract
      params(Alert)
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
mihari-7.2.0 lib/mihari/schemas/alert.rb
mihari-7.1.3 lib/mihari/schemas/alert.rb
mihari-7.1.2 lib/mihari/schemas/alert.rb
mihari-7.1.1 lib/mihari/schemas/alert.rb
mihari-7.1.0 lib/mihari/schemas/alert.rb
mihari-7.0.5 lib/mihari/schemas/alert.rb
mihari-7.0.4 lib/mihari/schemas/alert.rb
mihari-7.0.3 lib/mihari/schemas/alert.rb
mihari-7.0.2 lib/mihari/schemas/alert.rb
mihari-7.0.1 lib/mihari/schemas/alert.rb
mihari-7.0.0 lib/mihari/schemas/alert.rb