Class: Packages::PackageCreatedEvent
Instance Attribute Summary
#data
Instance Method Summary
collapse
#initialize
Instance Method Details
#generic? ⇒ Boolean
19
20
21
|
# File 'app/events/packages/package_created_event.rb', line 19
def generic?
data[:package_type] == 'generic'
end
|
#schema ⇒ Object
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# File 'app/events/packages/package_created_event.rb', line 5
def schema
{
'type' => 'object',
'properties' => {
'project_id' => { 'type' => 'integer' },
'name' => { 'type' => 'string' },
'version' => { 'type' => %w[string null] },
'package_type' => { 'type' => 'string', 'enum' => ::Packages::Package.package_types.keys },
'id' => { 'type' => 'integer' }
},
'required' => %w[project_id id name package_type]
}
end
|