File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -748,6 +748,42 @@ def test_plan_multi_parameter_fallback_help_text(client):
748748 )
749749
750750
751+ def test_plan_help_text_with_ref (client ):
752+ schema = {
753+ "$defs" : {
754+ "Spec" : {
755+ "properties" : {
756+ "foo" : {"type" : "integer" },
757+ "bar" : {"$ref" : "#/$defs/InnerSpec" },
758+ },
759+ "required" : ["foo" , "bar" ],
760+ },
761+ "InnerSpec" : {
762+ "properties" : {
763+ "x" : {"type" : "number" },
764+ "y" : {"default" : 10 , "type" : "number" },
765+ },
766+ "required" : ["x" ],
767+ },
768+ },
769+ "properties" : {
770+ "spec" : {"$ref" : "#/$defs/Spec" },
771+ "meta" : {"type" : "string" , "default" : "abc" },
772+ },
773+ "required" : ["spec" ],
774+ }
775+
776+ plan = Plan (
777+ "ref_plan" ,
778+ PlanModel (name = "ref_plan" , schema = schema ),
779+ client ,
780+ )
781+
782+ expected = "Plan ref_plan(spec: Spec, meta: str = 'abc')"
783+
784+ assert plan .help_text == expected
785+
786+
751787def test_plan_properties (client ):
752788 plan = Plan (
753789 "foo" ,
You can’t perform that action at this time.
0 commit comments