class GovukSchemas::RandomSchemaGenerator

def lookup_json_pointer(ref)

Look up a "pointer" like "#/definitions/title" in the schema.
def lookup_json_pointer(ref)
  elements = ref.split("/")
  elements.shift
  @schema.dig(*elements) || raise("Definition `#{ref}` not found in the schema")
end