MCPcopy Create free account
hub / github.com/axe-api/axe-api / getFillableFields

Method getFillableFields

packages/axe-api/src/Model.ts:354–374  ·  view source on GitHub ↗
(methodType: HttpMethods)

Source from the content-addressed store, hash-verified

352 }
353
354 getFillableFields(methodType: HttpMethods): string[] {
355 if (this.fillable === null) {
356 return [];
357 }
358
359 if (Array.isArray(this.fillable)) {
360 return this.fillable;
361 }
362
363 const values: IMethodBaseConfig<string[]> = this.fillable;
364 switch (methodType) {
365 case HttpMethods.PATCH:
366 return values.PATCH ?? [];
367 case HttpMethods.POST:
368 return values.POST ?? [];
369 case HttpMethods.PUT:
370 return values.PUT ?? [];
371 default:
372 return [];
373 }
374 }
375
376 getValidationRules(methodType: HttpMethods): ModelValidation | null {
377 if (this.hasStringValue()) {

Callers 6

PreparePhase.tsFile · 0.80
pushMethod · 0.80
Model.spec.tsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected