Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

7
  • Hi Will, I'm interested to hear what your use case is here, by which I mean what is the actual data / reason for wanting this? When evaluating what things to add to JSON Schema, we often require real life examples, so we ground changes based on real requirements and not academic ideals. Thanks. Commented Aug 3, 2020 at 8:49
  • Hi. Maybe I am not using the ideal tool for this, but here I use ajv to validate some large sql query result. The sql query varies in length, instructions are built and added based on the case at hand. The middle instructions are all the same, they are the ones corresponding to my example's "item3", whose results are all checked using the same definition. I cannot reorder the instructions, instructions before and after these repeated instructions have to be in that order (there are more than in this example, and the schema is of course more complex). Let me know if you have questions, thanks. Commented Aug 3, 2020 at 9:19
  • I've just had a thought. This might be possible if you're willing and able to change implementations to (JASON Desrosiers own) Hyper Jump for JSON Schema validation, and update to use JSON Schema draft 2019-09... I'll be able to give you a full explanation and example later today! =] Commented Aug 3, 2020 at 9:23
  • Wait, no, I'm going crazy. Nevermind... =[ Commented Aug 3, 2020 at 9:26
  • @Relequestual well thanks for looking into this :-) I guess what I'm looking for is a sort of "regex", but to put together json schemas, not string checks... Maybe it will be part of a future schema spec! Commented Aug 3, 2020 at 9:29