Add complete public SDK coverage#57
Conversation
Greptile SummaryThis PR regenerates the Python SDK wrappers to expose the full public API surface — connections, connectors, and extended table operations — replacing raw
Confidence Score: 5/5Safe to merge. The organization_id body-injection fix is correct and test-covered; the new dict-body plumbing is well-isolated and independently tested. All changed code paths are either covered by new transport tests or follow the same verified pattern used for agents/policies. The _DictBody shim is tested in test_generated_request.py, and the three critical org_id cases (POST body+query, PATCH query-only, PUT query-only) each have an assertion. The only gaps are missing tests for ConnectorsAPI and several ConnectionsAPI read/delete methods, none of which have logic complex enough to hide a correctness bug. src/roe/api/connections.py and src/roe/api/connectors.py have untested methods (list, retrieve, delete, test, test_credentials, and both connector methods). Important Files Changed
Sequence Diagram%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant C as Client code
participant API as ConnectionsAPI
participant RJ as request_json / request_raw
participant DB as _DictBody
participant EP as Generated endpoint module
participant SRV as Roe API server
C->>API: api.create(connector_type, name, config)
API->>API: build body dict, inject org_id (POST only)
API->>RJ: "request_json(raw, ep, body=dict, organization_id=UUID)"
RJ->>DB: wrap dict → _DictBody(dict)
RJ->>EP: "_get_kwargs(body=_DictBody, organization_id=UUID)"
EP-->>RJ: "request_kwargs {method, url, json, params}"
RJ->>RJ: "override request_kwargs[json] = original dict"
RJ->>SRV: httpx POST request
SRV-->>RJ: 201 JSON
RJ->>RJ: translate_response (raise on error)
RJ->>EP: _build_response → Response[Connection]
EP-->>API: "resp.parsed = Connection"
API-->>C: Connection
C->>API: "api.update(connection_id, name=x)"
API->>API: build body dict, NO org_id injection for PATCH
API->>RJ: "request_json(raw, ep, connection_id, body=dict, organization_id=UUID)"
RJ->>SRV: "PATCH /v1/connections/{id}/?organization_id=..."
SRV-->>RJ: 200 JSON
RJ-->>API: "resp.parsed = Connection"
API-->>C: Connection
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant C as Client code
participant API as ConnectionsAPI
participant RJ as request_json / request_raw
participant DB as _DictBody
participant EP as Generated endpoint module
participant SRV as Roe API server
C->>API: api.create(connector_type, name, config)
API->>API: build body dict, inject org_id (POST only)
API->>RJ: "request_json(raw, ep, body=dict, organization_id=UUID)"
RJ->>DB: wrap dict → _DictBody(dict)
RJ->>EP: "_get_kwargs(body=_DictBody, organization_id=UUID)"
EP-->>RJ: "request_kwargs {method, url, json, params}"
RJ->>RJ: "override request_kwargs[json] = original dict"
RJ->>SRV: httpx POST request
SRV-->>RJ: 201 JSON
RJ->>RJ: translate_response (raise on error)
RJ->>EP: _build_response → Response[Connection]
EP-->>API: "resp.parsed = Connection"
API-->>C: Connection
C->>API: "api.update(connection_id, name=x)"
API->>API: build body dict, NO org_id injection for PATCH
API->>RJ: "request_json(raw, ep, connection_id, body=dict, organization_id=UUID)"
RJ->>SRV: "PATCH /v1/connections/{id}/?organization_id=..."
SRV-->>RJ: 200 JSON
RJ-->>API: "resp.parsed = Connection"
API-->>C: Connection
Reviews (3): Last reviewed commit: "fix: keep connection org id out of updat..." | Re-trigger Greptile |
a92715a to
0dc0ef1
Compare
|
/greptile |
|
@greptile review |
|
@greptile review |
|
/greptile |
2 similar comments
|
/greptile |
|
/greptile |
a719b08 to
32e9279
Compare
Summary
Validation
Depends on roe-python #56 and the roe-main complete-coverage follow-up.