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

Cannot import a ref which was generated by helm-schema due to new required lines

Open snuggie12 opened this issue 1 year ago • 1 comments

We were creating a sub schema for something and we used helm-schema to create it. In a recent change every field gets a "required": [] added to it.

If using the sub schema as a $ref then you get an unmarshalling error since an empty array is not a BoolOrArrayOfString.

I think maybe there's a couple of problems there but not sure:

  • Should required be getting added to anything except an object? It seems to me it's supposed to be on objects which have properties only.
  • I don't entirely understand the unmarshaling error, but was thinking it gets solved either by using a byte array, reflection, or generics.

snuggie12 avatar Sep 30 '24 20:09 snuggie12

Hi snuggie12, thanks for your report. I'll try to get rid of these empty required fields....they weren't added intentional

dadav avatar Oct 01 '24 17:10 dadav

Should be fixed in #79

dadav avatar Dec 06 '24 21:12 dadav