NewSchema is a constructor for a schema
(id, plural, title, description, singular string)
| 84 | |
| 85 | //NewSchema is a constructor for a schema |
| 86 | func NewSchema(id, plural, title, description, singular string) *Schema { |
| 87 | schema := &Schema{ |
| 88 | ID: id, |
| 89 | Title: title, |
| 90 | Plural: plural, |
| 91 | Description: description, |
| 92 | Singular: singular, |
| 93 | Extends: []string{}, |
| 94 | OrderPropertiesBefore: []string{}, |
| 95 | } |
| 96 | return schema |
| 97 | } |
| 98 | |
| 99 | //NewSchemaFromObj is a constructor for a schema by obj |
| 100 | func NewSchemaFromObj(rawTypeData interface{}) (*Schema, error) { |