File tree Expand file tree Collapse file tree 3 files changed +22
-4
lines changed
airbyte_cdk/manifest_server Expand file tree Collapse file tree 3 files changed +22
-4
lines changed Original file line number Diff line number Diff line change 1+ from pydantic import BaseModel
2+
3+
4+ class CapabilitiesResponse (BaseModel ):
5+ """Capabilities of the manifest server."""
6+
7+ custom_code_execution : bool
Original file line number Diff line number Diff line change 4141 content :
4242 application/json :
4343 schema :
44- type : object
45- title : Response Getcapabilities
44+ $ref : ' #/components/schemas/CapabilitiesResponse'
4645 /v1/manifest/test_read :
4746 post :
4847 tags :
@@ -280,6 +279,16 @@ components:
280279 - response
281280 title : AuxiliaryRequest
282281 description : Auxiliary HTTP request made during stream processing.
282+ CapabilitiesResponse :
283+ properties :
284+ custom_code_execution :
285+ type : boolean
286+ title : Custom Code Execution
287+ type : object
288+ required :
289+ - custom_code_execution
290+ title : CapabilitiesResponse
291+ description : Capabilities of the manifest server.
283292 CheckRequest :
284293 properties :
285294 manifest :
Original file line number Diff line number Diff line change 33
44from fastapi import APIRouter
55
6+ from ..api_models .capabilities import CapabilitiesResponse
7+
68router = APIRouter (
79 prefix = "/capabilities" ,
810 tags = ["capabilities" ],
911)
1012
1113
1214@router .get ("/" , operation_id = "getCapabilities" )
13- def get_capabilities () -> Dict [ str , Any ] :
15+ def get_capabilities () -> CapabilitiesResponse :
1416 """
1517 Get the capabilities available for the manifest server.
1618
@@ -20,4 +22,4 @@ def get_capabilities() -> Dict[str, Any]:
2022 # Read the same environment variable as the connector builder server
2123 enable_unsafe_code = os .getenv ("AIRBYTE_ENABLE_UNSAFE_CODE" , "false" ).lower () == "true"
2224
23- return { "customCodeExecution" : enable_unsafe_code }
25+ return CapabilitiesResponse ( custom_code_execution = enable_unsafe_code )
You can’t perform that action at this time.
0 commit comments