Download the PHP package raml-org/raml-php-parser without Composer
On this page you can find all versions of the php package raml-org/raml-php-parser. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download raml-org/raml-php-parser
More information about raml-org/raml-php-parser
Files in raml-org/raml-php-parser
Package raml-php-parser
Short Description A RAML parser built in php
License MIT
Homepage https://github.com/raml-org/raml-php-parser
Informations about the package raml-php-parser
See the RAML specification.
RAML 0.8 Support
For RAML 0.8 support follow version 2.
RAML 1.0 Support
For RAML 1.0 support follow version 3 or above. RAML 1.0 support is still work in progress.
What is done and should work:
- Part of RAML 1.0 type expressions
- Enums
- Union type expression (the "or"
|
operator) - Array of types
discriminator
anddiscriminatorValue
facets- Traits inheritance
To be implemented:
- Libraries
- 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
- Overlays and Extensions
- Improved Security Schemes
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 the package:
NoRouteFormatter
which does nothing and simply echoes the resultSymfonyRouteFormatter
which adds the routes to a SymfonyRouteCollection
Contributing
All versions of raml-php-parser with dependencies
ext-dom Version *
ext-json Version *
ext-pcre Version *
justinrainbow/json-schema Version ^5.0
symfony/yaml Version ^3.0|^4.0|^5.0
symfony/routing Version ^3.0|^4.0|^5.0|^v6.0
oodle/inflect Version ^0.2
psr/http-message Version ^1.0
willdurand/negotiation Version ^2.2.1|^3