-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
When a CustomModel is created, the object passed in to the Model constructor should be validated. Criteria should be as follows:
typeandendpointmust be strings and cannot be missing.endpointshould start with a/and have only URL-safe characters.- Schema object should not have any property names that collide with Jsonmonger’s interface:
- built-in method and property names:
fetch,save,destroy,toObject,saved - common internal property names, such as
__schema,__changed, etc. - It might make sense to validate this programmatically, so that new internal properties or built-ins are automatically reserved.
- built-in method and property names:
- Properties pointing at relationships should be checked for depth.
relationships.field_nameis correct;relationships.field_name.datais not.
Metadata
Metadata
Assignees
Labels
No labels