new Schema(schema, name, settings)
Represents a Schema instance. Basically, it represents one of your backend Resource specification (schema)
Parameters:
Name | Type | Description |
---|---|---|
schema |
Object | A schema object |
name |
string | The schema name |
settings |
apy.settings._Settings | A settings instance |
Example
var members = { lastname: { type: 'string'}, firstname: { type: 'string'}, address: { type: 'dict', schema: { road: { type: 'string'}, street: { type: 'string'}, zipcode: { type: 'integer'}, city: { type: 'string'}, } } }; var apySchema = new apy.components.Schema(members, 'members');
Methods
-
<static> Schema#load()
-
Loads a Schema Computes the
embedded
URI fragment Evaluates$isEmbeddable
propertyReturns:
itself (chaining pattern)