115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
|
# File 'lib/brief/model.rb', line 115
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
|