activerules / nugget
Validate complex JSON objects and process them on change.
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:HTML
Requires
- php: >=7.0
- activerules/json-guard: ^1.0.4
- activerules/json-reference: ^1.1.1
- asimlqt/php-google-spreadsheet-client: 3.0.*
- aws/aws-sdk-php: ^3.52
- google/apiclient: ^2.0
- nette/forms: ^2.4
- nette/utils: ^2.4
Requires (Dev)
- nette/tester: ^2.0
- php-coveralls/php-coveralls: ^1.0
- phpunit/phpunit: ^6.4
- squizlabs/php_codesniffer: ^3.1.1
- tracy/tracy: ^2.4
This package is not auto-updated.
Last update: 2024-11-01 20:37:06 UTC
README
A PHP7 library for defining, validating and processing JSON business objects.
The ActiveRules Nugget Schema treats all data as nuggets
.
These nuggets
can be defined, and related using JSON files.
Rules can then be applied to any changes to an object.
The resulting schema will be moving to dataencyclopedia.com.
Testing
Local only tests (run by Travis CI)
php vendor/bin/phpunit
Using remote schema (broken on Travis CI)
php vendor/bin/phpunit tests/Activerules/Nugget/NuggetTest-Dev.php --testdox
Generate Open API schema objects
ActiveRules object definitions are converted to Open API schema objects composed of property definitions.
Schema from object definitions
php src/bin/schemaFromObject.php -p "./properties" -o "./objects" -s "./t2"
php src/bin/o2s.php -p "./properties" -s "./schema" -o "./objects" -d "./schemadoc"
php src/bin/refsToURLs.php -s "./schema" -u "https://schmema.izzup.com" -o "./objects-izzup"
php src/bin/readPropertiesFromGoogle.php -s "1NeU79bJ-Zic-fwKK2PPuxntNXnbkyMKf6ZTIUHp1n4s" -c ~/.google/izzup-client_secret.json -p "./properties"
Update schema
php src/bin/convertSchemaRefs.php -s "./schema" -r "file://./" -o "./objects-local" -t "#/components/schema/"
php src/bin/convertSchemaRefs.php -s "./schema" -r "https://schema.izzup.com" -o "./objects-izzup" -t "#/components/schema/"
References
JSON References ($ref): https://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03
JSON Schema: http://json-schema.org/
Schemas: http://schema.org/