Download the PHP package therealgambo/php-raml-parser without Composer
On this page you can find all versions of the php package therealgambo/php-raml-parser. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download therealgambo/php-raml-parser
More information about therealgambo/php-raml-parser
Files in therealgambo/php-raml-parser
Package php-raml-parser
Short Description A RAML parser built in php
License MIT
Homepage https://github.com/alecsammon/php-raml-parser
Informations about the package php-raml-parser
PHP RAML Parser
!!Attention!! this is a work-in-progress of the RAML 1.0 specification, for RAML 0.8 see the master branch
Still TODO:
- User defined facets
- Full implementation of type expressions
- The shorthand array and the union type have been implemented
- Bi-dimensional array and the array-union combination have NOT been implemented yet.
- Multiple inheritance
- Annotations
- Libraries
- Overlays and Extensions
- Improved Security Schemes
Original documentation
Parses a RAML file into a PHP object.
See the RAML spec here: https://github.com/raml-org/raml-spec
Get started
Requires:
- composer (see https://getcomposer.org)
Parsing schemas
The library can convert schemas into an validation object. There is a default list, or they can be configured manually.
Each schema parser needs to conform to \Raml\Schema\SchemaParserInterface
and will return a instance of
\Raml\Schema\SchemaDefinitionInterface
.
Additional parsers and schema definitions can be created and passed into the \Raml\Parser
constructor
Exporting routes
It is also possible to export the entire RAML file to an array of the full endpoints. For example, considering a basic RAML, this can be returned using:
To return:
Route Formatters
There are two Route Formatters included in this package:
NoRouteFormatter
which does nothing and simply echoes the resultSymfonyRouteFormatter
which adds the routes to a SymfonyRouteCollection
Contributing
TODO
- Documentation/Markdown parser
- Date Representations?
- Parse RAML at provided URL
Supported (I Believe)
- Includes
- .yml/.yaml
- .raml/.rml
- .json (parsed using json-schema)
- Display Name
- Traits
- Resource Types
All versions of php-raml-parser with dependencies
justinrainbow/json-schema Version ~1.5
symfony/yaml Version ~3.0
symfony/routing Version ~3.0
oodle/inflect Version ~0.2
psr/http-message Version ^1.0