@morscherlab/mint-sdk 1.1.0-beta.6 → 1.1.0-beta.8

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.
@@ -0,0 +1 @@
1
+ export {};
@@ -11,6 +11,9 @@ export interface GeneratedJsonSchema {
11
11
  maximum?: number;
12
12
  minLength?: number;
13
13
  maxLength?: number;
14
+ minItems?: number;
15
+ maxItems?: number;
16
+ writeOnly?: boolean;
14
17
  properties?: Record<string, GeneratedJsonSchema>;
15
18
  additionalProperties?: boolean | GeneratedJsonSchema;
16
19
  required?: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@morscherlab/mint-sdk",
3
- "version": "1.1.0-beta.6",
3
+ "version": "1.1.0-beta.8",
4
4
  "description": "MINT Platform SDK — Vue 3 components, composables, and types for plugin development. MINT = Mass-spec INtegrated Toolkit.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -0,0 +1,23 @@
1
+ import { describe, expect, it } from 'vitest'
2
+
3
+ import type { GeneratedJsonSchema } from '../../types/generated-ui'
4
+
5
+ describe('GeneratedJsonSchema', () => {
6
+ it('should accept minimum array size constraints emitted by Pydantic', () => {
7
+ const schema: GeneratedJsonSchema = { minItems: 1 }
8
+
9
+ expect(schema.minItems).toBe(1)
10
+ })
11
+
12
+ it('should accept array size constraints emitted by Pydantic', () => {
13
+ const schema: GeneratedJsonSchema = { maxItems: 100 }
14
+
15
+ expect(schema.maxItems).toBe(100)
16
+ })
17
+
18
+ it('should accept write-only fields emitted by Pydantic', () => {
19
+ const schema: GeneratedJsonSchema = { writeOnly: true }
20
+
21
+ expect(schema.writeOnly).toBe(true)
22
+ })
23
+ })
@@ -12,6 +12,9 @@ export interface GeneratedJsonSchema {
12
12
  maximum?: number
13
13
  minLength?: number
14
14
  maxLength?: number
15
+ minItems?: number
16
+ maxItems?: number
17
+ writeOnly?: boolean
15
18
  properties?: Record<string, GeneratedJsonSchema>
16
19
  additionalProperties?: boolean | GeneratedJsonSchema
17
20
  required?: string[]