Add documentation for prefect sdk generate CLI#1
Conversation
- Add auto-generated CLI reference for `prefect sdk` command - Add how-to guide for generating typed SDKs from deployments - Update navigation in docs.json for both new pages - Regenerate CLI docs to include new --output options Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Keep only sdk.mdx from the CLI docs regeneration. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The code examples reference a hypothetical my_sdk module that doesn't exist, so they can't be executed as tests. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove marketing-style "before/after" section - Use sentence case headers - Task-oriented organization (CLI then Python) - Add opening context and further reading links - Direct, instructional tone throughout Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove marketing-style "before/after" section - Use sentence case headers - Task-oriented organization (CLI then Python) - Add opening context and further reading links - Direct, instructional tone throughout Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Move generate-custom-sdk.mdx to docs/v3/advanced/ - Create new "Deployments" group in Advanced section - Move form-building guide to new Deployments group - Both guides relate to deployment configuration Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| # If filtering by deployment name, check the full name matches | ||
| full_name = f"{flow_name}/{dep.name}" | ||
| if deployment_names and full_name not in deployment_names: | ||
| if deployment_names and dep.name not in deployment_names: |
There was a problem hiding this comment.
Deployment filter change breaks short name ambiguity warnings
Medium Severity
The condition was changed from full_name not in deployment_names to dep.name not in deployment_names. When users specify a short deployment name like "production" in deployment_names, the new condition evaluates to False (since dep.name equals the short name), causing the if-block to be skipped entirely. This means short_name_matches is never populated, so the ambiguity warning for deployments with the same short name across different flows will never be generated. The original logic correctly entered the matching block to track short names for warning purposes.
| variables = base_job_template["variables"] | ||
| if isinstance(variables, dict): | ||
| job_vars_schema = variables | ||
| job_vars_schema = base_job_template["variables"] |
There was a problem hiding this comment.
Removed type check allows non-dict values to crash renderer
Low Severity
The isinstance(variables, dict) type check was removed when extracting job_variables_schema from base_job_template["variables"]. The original code ensured only dict values were assigned; otherwise, job_vars_schema remained as the safe default empty dict. The new code assigns whatever value is present. If the API returns a truthy non-dict value (e.g., a non-empty string or list), the renderer's schema.get("properties") call at line 272 will raise an AttributeError since only dicts have a .get() method.
Benchmark PR from agentic-review-benchmarks#1
Note
Adds documentation and CLI reference for generating a typed SDK from deployments
v3/advanced/generate-custom-sdkwith usage examples (filters, options, infra overrides, async) and regeneration guidancev3/api-ref/cli/sdkand navigation updates (docs.json) to surface theprefect sdk generatecommand under Advanced → Deployments and CLI ReferenceSDK fetcher tweaks
strict=Truefrom parallel work pool fetch zippingWritten by Cursor Bugbot for commit 37e272d. Configure here.