prefect.runner
utils
prefect.runner.utils
Functions
inject_schemas_into_openapi
Augments the webserver’s OpenAPI schema with additional schemas from deployments / flows / tasks.
Args:
webserver
: The FastAPI instance representing the webserver.schemas_to_inject
: A dictionary of OpenAPI schemas to integrate.
Returns:
- The augmented OpenAPI schema dictionary.
merge_definitions
Integrates definitions from injected schemas into the OpenAPI components.
Args:
injected_schemas
: A dictionary of deployment-specific schemas.openapi_schema
: The base OpenAPI schema to update.
update_refs_in_schema
Recursively replaces $ref
with a new reference base in a schema item.
Args:
schema_item
: A schema or part of a schema to update references in.new_ref
: The new base string to replace in$ref
values.
update_refs_to_components
Updates all $ref
fields in the OpenAPI schema to reference the components section.
Args:
openapi_schema
: The OpenAPI schema to modify$ref
fields in.