@mintlify/validation 0.1.461 → 0.1.463

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -304,6 +304,7 @@ function convertCombinedSchema(schema, required) {
304
304
  const numberEnumProps = sharedProps;
305
305
  copyKeyIfDefined('default', schema, numberEnumProps);
306
306
  copyKeyIfDefined('x-default', schema, numberEnumProps);
307
+ copyKeyIfDefined('const', schema, numberEnumProps);
307
308
  copyExampleIfDefined(schema, numberEnumProps);
308
309
  return Object.assign({ type: schema.type === 'number' ? 'enum<number>' : 'enum<integer>', enum: schema.enum.filter((option) => typeof option === 'number') }, numberEnumProps);
309
310
  }
@@ -315,6 +316,7 @@ function convertCombinedSchema(schema, required) {
315
316
  copyKeyIfDefined('exclusiveMinimum', schema, numberProps);
316
317
  copyKeyIfDefined('default', schema, numberProps);
317
318
  copyKeyIfDefined('x-default', schema, numberProps);
319
+ copyKeyIfDefined('const', schema, numberProps);
318
320
  copyExampleIfDefined(schema, numberProps);
319
321
  return Object.assign({ type: schema.type }, numberProps);
320
322
  case 'string':
@@ -322,6 +324,7 @@ function convertCombinedSchema(schema, required) {
322
324
  const stringEnumProps = sharedProps;
323
325
  copyKeyIfDefined('default', schema, stringEnumProps);
324
326
  copyKeyIfDefined('x-default', schema, stringEnumProps);
327
+ copyKeyIfDefined('const', schema, stringEnumProps);
325
328
  copyExampleIfDefined(schema, stringEnumProps);
326
329
  return Object.assign({ type: 'enum<string>', enum: schema.enum.filter((option) => typeof option === 'string') }, stringEnumProps);
327
330
  }
@@ -400,6 +400,7 @@ export class SchemaConverter extends BaseConverter {
400
400
  copyKeyIfDefined('exclusiveMinimum', schema, numberProps);
401
401
  copyKeyIfDefined('default', schema, numberProps);
402
402
  copyKeyIfDefined('x-default', schema, numberProps);
403
+ copyKeyIfDefined('const', schema, numberProps);
403
404
  copyExampleIfDefined(schema, numberProps);
404
405
  return Object.assign({ type: schema.type }, numberProps);
405
406
  case 'string':
@@ -146,6 +146,7 @@ export type NumberSchema = {
146
146
  exclusiveMaximum?: boolean;
147
147
  minimum?: number;
148
148
  exclusiveMinimum?: boolean;
149
+ const?: number;
149
150
  } & BaseSchema<number>;
150
151
  type BaseObjectSchema<R> = {
151
152
  type: 'object';
@@ -167,10 +168,12 @@ type BaseArraySchema<R> = {
167
168
  export type StringEnumSchema = {
168
169
  type: 'enum<string>';
169
170
  enum: string[];
171
+ const?: string;
170
172
  } & BaseSchema<string>;
171
173
  export type NumberEnumSchema = {
172
174
  type: 'enum<number>' | 'enum<integer>';
173
175
  enum: number[];
176
+ const?: number;
174
177
  } & BaseSchema<number>;
175
178
  export type FileSchema = {
176
179
  type: 'file';