انتقل إلى المحتوى الرئيسي

Interface: IssueParams

Defined in: packages/contracts/src/validation.ts:40

What the schema asked for, on the side of a failure that came from the schema: a limit, the allowed values, the property that is missing or extra, the format, or the named rule a pattern stands for. Taken from Ajv's error parameters for the keywords that carry them and from no other, because only these are known to hold schema facts and never the submitted value. It lets a caller (the gateway) write a sentence a person can act on without parsing Ajv's English.

Properties​

allowed?​

readonly optional allowed?: readonly unknown[]

Defined in: packages/contracts/src/validation.ts:44

const (one value) and enum: what the schema accepts.


format?​

readonly optional format?: string

Defined in: packages/contracts/src/validation.ts:48

format: the format's name, such as email.


limit?​

readonly optional limit?: number

Defined in: packages/contracts/src/validation.ts:42

minLength, maxLength, minimum, maximum, minItems, maxItems and the exclusive bounds.


property?​

readonly optional property?: string

Defined in: packages/contracts/src/validation.ts:46

required: the missing property; additionalProperties: the extra one.


rule?​

readonly optional rule?: "uuid" | "tenant-scope-path" | "scope-path" | "slug" | "unreserved-label" | "bundle-code" | "display-name"

Defined in: packages/contracts/src/validation.ts:56

pattern: which of the contracts' own rules failed, by name. The regular expression itself is never carried: it is unreadable to a caller and noise in a log. A pattern that is not one of PATTERN_RULES has no rule.


type?​

readonly optional type?: string

Defined in: packages/contracts/src/validation.ts:50

type: the expected JSON type, such as string or integer.