2017 © Pedro Peláez
 

library gendarme

Application to generate constrained SKDs based on JSON schemas

image

calcinai/gendarme

Application to generate constrained SKDs based on JSON schemas

  • Thursday, December 1, 2016
  • by calcinai
  • Repository
  • 1 Watchers
  • 3 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Gendarme

A tool for creating PHP data structures from JSON Schemas., (*1)

Setup

via composer, (*2)

composer create-project calcinai/gendarme

Usage

From the project root:, (*3)

./bin/gendarme generate --namespace [TARGET_NAMESPACE] --root-class [ROOT_CLASS]  [SCHEMA_FILE].json [OUTPUT_DIR]

Output

All models will be PSR-4 compliant based on the arguments given at runtime. A typical output folder structure will be as follows:, (*4)

- OUTPUT_DIR
  - BaseSchema.php (the class all models extend)
  - RootClass.php (the --root-class argument)
  - Definitions
    - ...
    - ...

This project was started to generate the schema files for Strut, a Swagger/OAPI manipulation library. Although a very complex example, it shows the basic output structure that will be generated., (*5)

The generated models will include type-hinting to other models where possible, and non-hintable objects will be put in the doc blocks. At this point, many, but not all schema keywords are parsed. As more desired functionality is identified, more can be implemented., (*6)

The Versions

01/12 2016

dev-master

9999999-dev

Application to generate constrained SKDs based on JSON schemas

  Sources   Download

MIT

The Requires

 

01/12 2016

v0.1.2

0.1.2.0

Application to generate constrained SKDs based on JSON schemas

  Sources   Download

MIT

The Requires

 

26/11 2016

v0.1.1

0.1.1.0

Application to generate constrained SKDs based on JSON schemas

  Sources   Download

MIT

The Requires

 

04/10 2016

v0.1.0

0.1.0.0

Application to generate constrained SKDs based on JSON schemas

  Sources   Download

MIT

The Requires