Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions polyapi/deployables.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class ParsedDeployableConfig(TypedDict):
context: str
name: str
type: DeployableTypes
description: Optional[str]
disableAi: Optional[bool]
config: Dict[str, Any]

Expand Down
8 changes: 7 additions & 1 deletion polyapi/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,13 @@ def generic_visit(self, node):
deployable["context"] = context or deployable["config"].get("context", "")
deployable["name"] = name or deployable["config"].get("name", "")
deployable["disableAi"] = deployable["config"].get("disableAi", False)
deployable["description"] = deployable["types"].get("description", "")
deployable["description"] = deployable["config"].get("description", "")
if deployable["description"]:
if deployable["description"] != deployable["types"].get("description", ""):
deployable["types"]["description"] = deployable["description"]
deployable["dirty"] = True
else:
deployable["description"] = deployable["types"].get("description", "")
if not deployable["name"]:
print_red("ERROR")
print("Function config is missing a name.")
Expand Down
1 change: 1 addition & 0 deletions polyapi/typedefs.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ class SchemaSpecDto(TypedDict):
class PolyDeployable(TypedDict, total=False):
context: str
name: str
description: NotRequired[str]
disable_ai: NotRequired[bool] # Optional field to disable AI


Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = ["setuptools>=61.2", "wheel"]

[project]
name = "polyapi-python"
version = "0.3.8.dev8"
version = "0.3.8.dev9"
description = "The Python Client for PolyAPI, the IPaaS by Developers for Developers"
authors = [{ name = "Dan Fellin", email = "dan@polyapi.io" }]
dependencies = [
Expand Down