Sha256: 1c109805ec0cde0244dfb5a709c27872e7cc7bf051d9e9604d9816150b729e8f

Contents?: true

Size: 763 Bytes

Versions: 14

Compression:

Stored size: 763 Bytes

Contents

# frozen_string_literal: true

module Mihari
  module Entities
    class Alert < Grape::Entity
      expose :id, documentation: { type: Integer, required: true }
      expose :rule_id, documentation: { type: String, required: true }, as: :ruleId
      expose :created_at, documentation: { type: DateTime, required: true }, as: :createdAt

      expose :artifacts, using: Entities::BaseArtifact, documentation: { type: Entities::BaseArtifact, is_array: true }
      expose :tags, using: Entities::Tag, documentation: { type: Entities::Tag, is_array: true, required: true }
    end

    class AlertsWithPagination < Pagination
      expose :results, using: Entities::Alert, documentation: { type: Entities::Alert, is_array: true, required: true }
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

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