Download the PHP package jasir/php-raml-parser without Composer
On this page you can find all versions of the php package jasir/php-raml-parser. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jasir/php-raml-parser
More information about jasir/php-raml-parser
Files in jasir/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
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 ~2.6
symfony/routing Version ~2.5
oodle/inflect Version ~0.2