From olaf at vilerichard.com Thu May 28 15:17:18 2026 From: olaf at vilerichard.com (Olaf Alders) Date: Thu, 28 May 2026 18:17:18 -0400 Subject: [tpm] Tonight's meeting is online and starting at 7 pm Message-ID: <638aebe5-2b2a-422a-b9cb-70ced314f865@app.fastmail.com> https://luma.com/k73djcf1 -------------- next part -------------- An HTML attachment was scrubbed... URL: From yanick at babyl.ca Thu May 28 17:09:52 2026 From: yanick at babyl.ca (Yanick Champoux) Date: Thu, 28 May 2026 20:09:52 -0400 Subject: [tpm] Tonight's meeting is online and starting at 7 pm In-Reply-To: <638aebe5-2b2a-422a-b9cb-70ced314f865@app.fastmail.com> References: <638aebe5-2b2a-422a-b9cb-70ced314f865@app.fastmail.com> Message-ID: To follow-up on the naive schema creator: #!/usr/bin/env perl use 5.42.0; use warnings; use Ref::Util qw/ is_plain_arrayref is_plain_hashref /; use List::Util qw/ pairmap /; use builtin 'created_as_number'; use YAML; use File::Serialize; my $example = deserialize_file shift; say YAML::Dump( schematize($example) ); sub schematize($example) { my %schema; if ( is_plain_hashref $example ) { $schema{type} = 'object'; $schema{properties} = +{ pairmap { $a => schematize($b) } %$example }; } elsif ( is_plain_arrayref $example ) { $schema{type} = 'array'; $schema{items} = { anyOf => [ map { schematize($_) } @$example ] }; } else { $schema{type} = created_as_number $example ? 'number' : 'string'; } return \%schema; } __END__ It's not clever, but it'll provide you with a starting skeleton. And something to think about with those super-complex documents is those { $ref: .. } links to keep things small and manageable. Joy, `/anick On Thu, 28 May 2026, at 6:17 PM, Olaf Alders wrote: > > https://luma.com/k73djcf1 > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > https://mail.pm.org/mailman/listinfo/toronto-pm > -------------- next part -------------- An HTML attachment was scrubbed... URL: