Sha256: b35e66556a990492a9387f16e992cd084344f78645f96c491905c070221491bd
Contents?: true
Size: 1.58 KB
Versions: 25
Compression:
Stored size: 1.58 KB
Contents
# frozen_string_literal: true module Mihari module Entities class Query < Grape::Entity expose :analyzer, documentation: { type: String, required: true } expose :query, documentation: { type: String, required: true } expose :interval, documentation: { type: Integer, required: false } end class Emitter < Grape::Entity expose :emitter, documentation: { type: String, required: true } end class Rule < Grape::Entity expose :id, documentation: { type: String, required: true } expose :title, documentation: { type: String, required: true } expose :description, documentation: { type: String, required: true } expose :yaml, documentation: { type: String, required: true } expose :created_at, documentation: { type: DateTime, required: true }, as: :createdAt expose :updated_at, documentation: { type: DateTime, required: true }, as: :updatedAt expose :tags, using: Entities::Tag, documentation: { type: Entities::Tag, is_array: true, required: true } end class RulesWithPagination < Grape::Entity expose :rules, using: Entities::Rule, documentation: { type: Entities::Rule, is_array: true, required: true } expose :total, documentation: { type: Integer, required: true } expose :current_page, documentation: { type: Integer, required: true }, as: :currentPage expose :page_size, documentation: { type: Integer, required: true }, as: :pageSize end class RuleIDs < Grape::Entity expose :rule_ids, documentation: { type: [String], required: true }, as: :ruleIds end end end
Version data entries
25 entries across 25 versions & 1 rubygems