Skip to content

Commit

Permalink
fix: build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
srijanpatel committed Feb 1, 2025
1 parent 19e50c9 commit 5577ebe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/src/types/api_types/modelMetadataSchemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export interface FieldMetadata {
maximum?: number
type?: string
required?: boolean
properties?: Record<string, FieldMetadata>
}

export interface ModelConstraints {
Expand All @@ -17,4 +18,4 @@ export interface ModelConstraints {

export interface ModelConstraintsMap {
[modelId: string]: ModelConstraints
}
}
1 change: 1 addition & 0 deletions frontend/src/utils/JSPydanticModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ class JSPydanticModel {

// Add required field if this field is required or has minLength > 0
if (schema.minLength > 0 || schema === '...') {
// @ts-ignore
metadata.required = true
}

Expand Down

0 comments on commit 5577ebe

Please sign in to comment.