MCPcopy Create free account
hub / github.com/zenstackhq/zenstack / requireField

Method requireField

packages/server/src/api/rest/index.ts:1837–1844  ·  view source on GitHub ↗
(model: string, field: string)

Source from the content-addressed store, hash-verified

1835 }
1836
1837 private requireField(model: string, field: string): FieldDef {
1838 const modelDef = this.requireModel(model);
1839 const fieldDef = modelDef.fields[field];
1840 if (!fieldDef) {
1841 throw new Error(`Field ${field} is not defined in model ${model}`);
1842 }
1843 return fieldDef;
1844 }
1845
1846 private buildTypeMap() {
1847 this.typeMap = {};

Callers 15

getIdFieldsMethod · 0.95
postUpdateCheckMethod · 0.80
unwrapCreateValueRowMethod · 0.80
getFieldPoliciesMethod · 0.80
checkFunction · 0.80
_fieldMethod · 0.80
getMemberTypeMethod · 0.80
_memberMethod · 0.80
valueMemberAccessMethod · 0.80
createColumnRefMethod · 0.80

Calls 1

requireModelMethod · 0.95

Tested by

no test coverage detected