Skip to content

API reference / @chanx-js/codegen / JsonSchema

Interface: JsonSchema ​

Defined in: schema.ts:3

The slice of AsyncAPI 3 that chanx emits. Deliberately permissive.

Indexable ​

ts
[key: string]: unknown

Properties ​

$ref? ​

ts
optional $ref?: string;

Defined in: schema.ts:4


additionalProperties? ​

ts
optional additionalProperties?: boolean | JsonSchema;

Defined in: schema.ts:16


allOf? ​

ts
optional allOf?: JsonSchema[];

Defined in: schema.ts:19


anyOf? ​

ts
optional anyOf?: JsonSchema[];

Defined in: schema.ts:17


const? ​

ts
optional const?: unknown;

Defined in: schema.ts:8


default? ​

ts
optional default?: unknown;

Defined in: schema.ts:10


description? ​

ts
optional description?: string;

Defined in: schema.ts:6


discriminator? ​

ts
optional discriminator?: 
  | string
  | {
  propertyName?: string;
};

Defined in: schema.ts:20


enum? ​

ts
optional enum?: unknown[];

Defined in: schema.ts:9


format? ​

ts
optional format?: string;

Defined in: schema.ts:11


items? ​

ts
optional items?: JsonSchema;

Defined in: schema.ts:15


nullable? ​

ts
optional nullable?: boolean;

Defined in: schema.ts:12


oneOf? ​

ts
optional oneOf?: JsonSchema[];

Defined in: schema.ts:18


properties? ​

ts
optional properties?: Record<string, JsonSchema>;

Defined in: schema.ts:13


required? ​

ts
optional required?: string[];

Defined in: schema.ts:14


title? ​

ts
optional title?: string;

Defined in: schema.ts:5


type? ​

ts
optional type?: string | string[];

Defined in: schema.ts:7

MIT licensed