diff --git a/docs/annotations.md b/docs/annotations.md new file mode 100644 index 0000000..d2ef69e --- /dev/null +++ b/docs/annotations.md @@ -0,0 +1,4 @@ +Fazland - ApiPlatformBundle - Annotations +========================================= + +Work in progress diff --git a/docs/aql.md b/docs/aql.md new file mode 100644 index 0000000..6cbcf08 --- /dev/null +++ b/docs/aql.md @@ -0,0 +1,4 @@ +Fazland - ApiPlatformBundle - AQL (ApiPlatformBundle Query Language) +==================================================================== + +Work in progress diff --git a/docs/form-features.md b/docs/form-features.md new file mode 100644 index 0000000..35985c8 --- /dev/null +++ b/docs/form-features.md @@ -0,0 +1,59 @@ +Fazland - ApiPlatformBundle - Form Features +=========================================== + +This bundle introduce some [Symfony Form](https://github.com/symfony/form) features: + +Types +----- +#### `Fazland\ApiPlatformBundle\Form\CheckboxType` +Type that extends the Symfony base type with the `false_values` options set to `['0', 'false', 'no', 'off', 'n', 'f']` + +#### `Fazland\ApiPlatformBundle\Form\CollectionType` +Type that extends the Symfony base type with the `allow_add`, `allow_delete`, `delete_empty` options set to `true` and `error_bubbling` to false. + +#### `Fazland\ApiPlatformBundle\Form\IsoDateTimeType` and `Fazland\ApiPlatformBundle\Form\IsoDateTimeImmutableType` +Type with the `DateTimeToIso8601Transformer` view transformer already set. + +#### `Fazland\ApiPlatformBundle\Form\PageTokenType` +This type accepts a valid `Fazland\ApiPlatformBundle\Pagination\PageToken` string representation. `Fazland\ApiPlatformBundle\Pagination\PageToken` are discussed into the [Pagination and continuation token](./pagination-continuation-token.md) section. + +#### `Fazland\ApiPlatformBundle\Form\TelType` +Type with the `PhoneNumberToStringTransformer` view transformer already set. + +#### `Fazland\ApiPlatformBundle\Form\UnstructuredType` +This type accepts any data. This is suitable if you don't have a structure or you don't want to specify the single fields on it. + +Transformers +------------ +#### `Fazland\ApiPlatformBundle\Form\DataTransformer\Money\CodeToCurrencyTransformer` +Transforms a valid currency ISO string into a valid `Money\Currency` object. + +#### `Fazland\ApiPlatformBundle\Form\DataTransformer\Money\MoneyTransformer` +Transforms an array with keys `amount` and `currency` into a valid `Money\Money` object. + +#### `Fazland\ApiPlatformBundle\Form\DataTransformer\Base64ToUploadedFileTransformer` +Transforms a data uri string into an instance of `UploadedFile`. + +#### `Fazland\ApiPlatformBundle\Form\DataTransformer\BooleanTransformer` +Transforms `['1', 'true', 'yes', 'on', 'y', 't']` as true values and `['0', 'false', 'no', 'off', 'n', 'f']` as false values. + +#### `Fazland\ApiPlatformBundle\Form\DataTransformer\BooleanTransformer` +Accepts at its construction a list of transformers and use those one by one to transform the passed values. + +#### `Fazland\ApiPlatformBundle\Form\DataTransformer\DateTimeToIso8601Transformer` and `Fazland\ApiPlatformBundle\Form\DataTransformer\DateTransformer` +Accepts strings in some date formats and transform those into valid `\DateTimeInterface` instances. + +#### `Fazland\ApiPlatformBundle\Form\DataTransformer\IntegerTransformer` +Accepts numeric strings and transform it into valid integers. + +#### `Fazland\ApiPlatformBundle\Form\DataTransformer\MappingTransformer` +Accepts a transformer at its construction and applies it for each value passed. + +#### `Fazland\ApiPlatformBundle\Form\DataTransformer\NullableMappingTransformer` +As above but returns null if the value is null. + +#### `Fazland\ApiPlatformBundle\Form\DataTransformer\PageTokenTransformer` +Transforms a `PageToken` instance into a string and vice versa. + +#### `Fazland\ApiPlatformBundle\Form\DataTransformer\PhoneNumberToString` +Transforms a `PhoneNumber` instance into a string and vice versa. diff --git a/docs/getting-started.md b/docs/getting-started.md new file mode 100644 index 0000000..cd0c4a8 --- /dev/null +++ b/docs/getting-started.md @@ -0,0 +1,23 @@ +Fazland - ApiPlatformBundle +=========================== + +ApiPlatformBundle is a Symfony bundle that helps you building RESTful API within your application. +Just register in the `bundles.php` the bundle and you'll have all the features available. +```php + ['all' => true], + // [...] +]; +``` + +What comes with ApiPlatformBundle? +---------------------------------- +- [Form features](./form-features.md) +- [Request body converters](./request-body-converters.md) +- [PatchManager](./patch-manager.md) +- [Annotations](./annotations.md) +- [Pagination and continuation token](./pagination-continuation-token.md) +- [AQL (ApiPlatformBundle Query language)](./aql.md) diff --git a/docs/pagination-continuation-token.md b/docs/pagination-continuation-token.md new file mode 100644 index 0000000..264ec40 --- /dev/null +++ b/docs/pagination-continuation-token.md @@ -0,0 +1,4 @@ +Fazland - ApiPlatformBundle - Pagination and continuation token +=============================================================== + +Work in progress diff --git a/docs/patch-manager.md b/docs/patch-manager.md new file mode 100644 index 0000000..dea329d --- /dev/null +++ b/docs/patch-manager.md @@ -0,0 +1,4 @@ +Fazland - ApiPlatformBundle - Patch Manager +=========================================== + +Work in progress diff --git a/docs/request-body-converters.md b/docs/request-body-converters.md new file mode 100644 index 0000000..aacca9f --- /dev/null +++ b/docs/request-body-converters.md @@ -0,0 +1,4 @@ +Fazland - ApiPlatformBundle - Request Body Converters +===================================================== + +Work in progress