fix: make workflow drafts explicitly opt in
This commit is contained in:
@@ -14,8 +14,15 @@ from .normalize import manifest_from_openrpc
|
||||
def generate_manifest() -> ContractManifest:
|
||||
"""Compose the real server against an isolated store and normalize OpenRPC."""
|
||||
with TemporaryDirectory(prefix="wf-contract-manifest-") as directory:
|
||||
server = build_local_static_workflow_server(Path(directory) / "store")
|
||||
document = cast(dict[str, object], create_rpc_app(server).get_openrpc())
|
||||
# The checked contract describes the complete opt-in API. Product
|
||||
# composition remains draft-free by default; contract generation is
|
||||
# the deliberate compatibility seam that asks for the full surface.
|
||||
server = build_local_static_workflow_server(
|
||||
Path(directory) / "store", drafts=True
|
||||
)
|
||||
document = cast(
|
||||
dict[str, object], create_rpc_app(server, drafts=True).get_openrpc()
|
||||
)
|
||||
# Normalization deliberately drops framework metadata that could carry
|
||||
# process-local paths or transport details.
|
||||
return manifest_from_openrpc(document)
|
||||
|
||||
Reference in New Issue
Block a user