Sha256: 9bc535665afca1660c6cac8550e58c61956dcbc664a2abb81649d0c12d093053

Contents?: true

Size: 644 Bytes

Versions: 19

Compression:

Stored size: 644 Bytes

Contents

# frozen_string_literal: true

require "dry/schema"
require "dry/validation"

require "mihari/schemas/macros"

module Mihari
  module Schemas
    AnalyzerRun = Dry::Schema.Params do
      required(:title).value(:string)
      required(:description).value(:string)
      required(:source).value(:string)
      required(:artifacts).value(array[:string])

      optional(:tags).value(array[:string]).default([])
      optional(:ignoreOldArtifacts).value(:bool).default(false)
      optional(:ignoreThreshold).value(:integer).default(0)
    end

    class AnalyzerRunContract < Dry::Validation::Contract
      params(AnalyzerRun)
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
mihari-3.12.0 lib/mihari/schemas/analyzer.rb
mihari-3.11.0 lib/mihari/schemas/analyzer.rb
mihari-3.10.1 lib/mihari/schemas/analyzer.rb
mihari-3.10.0 lib/mihari/schemas/analyzer.rb
mihari-3.9.2 lib/mihari/schemas/analyzer.rb
mihari-3.9.1 lib/mihari/schemas/analyzer.rb
mihari-3.9.0 lib/mihari/schemas/analyzer.rb
mihari-3.8.1 lib/mihari/schemas/analyzer.rb
mihari-3.8.0 lib/mihari/schemas/analyzer.rb
mihari-3.7.2 lib/mihari/schemas/analyzer.rb
mihari-3.7.1 lib/mihari/schemas/analyzer.rb
mihari-3.7.0 lib/mihari/schemas/analyzer.rb
mihari-3.6.1 lib/mihari/schemas/analyzer.rb
mihari-3.6.0 lib/mihari/schemas/analyzer.rb
mihari-3.5.0 lib/mihari/schemas/analyzer.rb
mihari-3.4.1 lib/mihari/schemas/analyzer.rb
mihari-3.4.0 lib/mihari/schemas/analyzer.rb
mihari-3.3.0 lib/mihari/schemas/analyzer.rb
mihari-3.2.0 lib/mihari/schemas/analyzer.rb