From c3d38008e43df7731e44ba033e24ff770ff40a06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20P=C4=99czek?= Date: Thu, 28 Nov 2024 16:05:25 +0100 Subject: [PATCH] Fix issue with workflows schema endpoint --- inference/core/entities/responses/workflows.py | 7 +++---- .../execution_engine/v1/compiler/syntactic_parser.py | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/inference/core/entities/responses/workflows.py b/inference/core/entities/responses/workflows.py index c8255f995..dbde74cd1 100644 --- a/inference/core/entities/responses/workflows.py +++ b/inference/core/entities/responses/workflows.py @@ -1,6 +1,6 @@ from typing import Any, Dict, List, Optional, Union -from pydantic import BaseModel, Field +from pydantic import BaseModel, ConfigDict, Field from inference.core.workflows.core_steps.common.query_language.entities.introspection import ( OperationDescription, @@ -160,9 +160,8 @@ class ExecutionEngineVersions(BaseModel): class WorkflowsBlocksSchemaDescription(BaseModel): - blocks_schema: dict = Field( - description="Schema for validating block definitions", alias="schema" - ) + model_config = ConfigDict(protected_namespaces=()) + schema: dict = Field(description="Schema for validating block definitions") class DescribeInterfaceResponse(BaseModel): diff --git a/inference/core/workflows/execution_engine/v1/compiler/syntactic_parser.py b/inference/core/workflows/execution_engine/v1/compiler/syntactic_parser.py index e1f9df680..9eeb4f873 100644 --- a/inference/core/workflows/execution_engine/v1/compiler/syntactic_parser.py +++ b/inference/core/workflows/execution_engine/v1/compiler/syntactic_parser.py @@ -97,4 +97,4 @@ def get_workflow_schema_description() -> WorkflowsBlocksSchemaDescription: available_blocks=available_blocks ) schema = workflow_definition_class.model_json_schema() - return WorkflowsBlocksSchemaDescription(blocks_schema=schema) + return WorkflowsBlocksSchemaDescription(schema=schema)