Shapes and Hanami
Here we list advice on how to write your shapes so that Hanami can properly work with them, or list potential common pitfalls.
Avoid reusing property shapes
Reusing the exact same property shape in different node shapes is ok, as Hanami will be able to render that property in those contexts without issue. But we still advice against it because ordering and grouping are properties of the sh:PropertyShape
itself, and so having to set those correctly so that the same sh:PropertyShape
is rendered in the correct place in 2+ forms can be painful to manage.
Partial handling of sh:and
sh:and
can be used on either sh:NodeShape
or sh:PropertyShape
, but they are virtually ignored for form generation, and are only used for validation.