helm-schema icon indicating copy to clipboard operation
helm-schema copied to clipboard

Can't use relative $ref inside of patternProperties

Open snuggie12 opened this issue 1 year ago • 1 comments

While testing out the new relative path for $ref change you made for me, we ran into an issue. Given this annotation:

+# @schema
+# type: object
+# patternProperties:
+#   "^.*":
+#     $ref: apps-subschema.json#/app
+# @schema

We got the following error:

Error: values don't meet the specifications of the schema(s) in the following chart(s):
foo:
Reference /apps-subschema.json#/app must be canonical

Reading through the json schema documentation this makes sense. I didn't know if it'd be possible to put some sort of helper function which expands the $ref into patternProperties like how it works as a standalone annotation.

snuggie12 avatar Sep 30 '24 20:09 snuggie12

Hi snuggie12, thanks for your report, I'll look into this issue asap.

dadav avatar Oct 01 '24 17:10 dadav