127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
|
# File 'lib/brief/model.rb', line 127
def to_schema
{
schema: {
content: definition.content_schema,
metadata: definition.metadata_schema,
},
class_name: to_s,
type_alias: type_alias,
name: name,
group: name.to_s.pluralize,
actions: defined_actions,
example: definition.example_body.to_s,
template: definition.template_body.to_s,
urls: {
browse_url: "browse/#{ type_alias.to_s.pluralize }",
schema_url: "schema/#{ type_alias }"
}
}
end
|