Ah right - so since we want to have separate JSON schemas for validating the snap declaration and for validating the snap yaml, we want to then share common type definitions between the two - this was the context I was missing.
So I am not against this change then but as we don't yet have a snap declaration schema, I think it seems a bit like premature optimisation to split out the types into a separate json schema at this time - however, since you are leading this work I am happy to go with your preferred approach. Feel free to go forward with this separate definitions.json approach :)
Ah right - so since we want to have separate JSON schemas for validating the snap declaration and for validating the snap yaml, we want to then share common type definitions between the two - this was the context I was missing.
So I am not against this change then but as we don't yet have a snap declaration schema, I think it seems a bit like premature optimisation to split out the types into a separate json schema at this time - however, since you are leading this work I am happy to go with your preferred approach. Feel free to go forward with this separate definitions.json approach :)
LGTM!