https://github.com/getty/perl-moosex-jsonschema
MooseX::JSONSchema
https://github.com/getty/perl-moosex-jsonschema
Last synced: about 1 year ago
JSON representation
MooseX::JSONSchema
- Host: GitHub
- URL: https://github.com/getty/perl-moosex-jsonschema
- Owner: Getty
- Created: 2024-07-31T00:16:18.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-03T20:36:08.000Z (almost 2 years ago)
- Last Synced: 2025-02-08T06:42:56.193Z (over 1 year ago)
- Language: Perl
- Size: 8.79 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SYNOPSIS
package PersonClass;
use Moose;
use MooseX::JSONSchema;
json_schema_title "A person";
string first_name => "The first name of the person";
string last_name => "The last name of the person";
integer age => "Current age in years", json_schema_args => { minimum => 0, maximum => 200 };
1;
package CharacterClass;
use Moose;
use MooseX::JSONSchema;
extends 'PersonClass';
json_schema_title "Extended person";
string job => "The job of the person";
1;
my $json_schema_json = PersonClass->meta->json_schema_json;
my $person = PersonClass->new(
first_name => "Peter",
last_name => "Parker",
age => 21,
);
my $json_schema_data_json = $person->json_schema_data_json;
# DESCRIPTION
**THIS API IS WORK IN PROGRESS**
# SUPPORT
Repository
https://github.com/Getty/perl-moosex-jsonschema
Pull request and additional contributors are welcome
Issue Tracker
https://github.com/Getty/perl-moosex-jsonschema/issues