🔧 chore(component.py): add Optional type hint to the 'code' field in the Component model to indicate that it is an optional field
🔧 chore(component.py): update the error message in the validate_entrypoint_name function to provide more clarity on the required field
This commit is contained in:
parent
c93febc7a3
commit
57dd75b3f5
1 changed files with 2 additions and 1 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import ast
|
||||
from typing import Optional
|
||||
from pydantic import BaseModel
|
||||
from fastapi import HTTPException
|
||||
|
||||
|
|
@ -20,7 +21,7 @@ class Component(BaseModel):
|
|||
"The name of the entrypoint function must be provided."
|
||||
)
|
||||
|
||||
code: str
|
||||
code: Optional[str]
|
||||
function_entrypoint_name = "build"
|
||||
field_config: dict = {}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue