1050 Commits

Author SHA1 Message Date
William DURAND
39dd41e285 Merge pull request #388 from yoshz/feature/body_format
Added configuration to disable body formats
2014-06-25 10:30:56 +02:00
William DURAND
8ddade0e30 Merge pull request #407 from jonmchan/ParameterTypeSupport 2014-06-25 10:25:59 +02:00
Jonathan Chan
1cd77e2f14 added support to properly handle file upload POST 2014-06-25 10:25:45 +02:00
Jonathan Chan
210596eae9 adding support for different parameter types 2014-06-25 10:25:45 +02:00
Jonathan Chan
b124824a8d added file type to FormType Parser 2014-06-25 10:25:45 +02:00
William DURAND
96e5d15f1b Merge pull request #412 from grEvenX/nullable_request_support 2014-06-25 10:20:00 +02:00
Even André Fiskvik
b4e874e2dc Add support for nullable option in RequestParam 2014-06-25 10:19:30 +02:00
William DURAND
607d031051 Merge pull request #413 from bezhermoso/unified_data_types 2014-06-25 09:06:32 +02:00
Bez Hermoso
14d1021c8b Unified data types [actualType and subType]
This is the result of https://github.com/nelmio/NelmioApiDocBundle/issues/410.

This PR aims to provide a uniform way of declaring data-types of parameters for
parsers and handlers to follow. In turn, this would allow formatters to
determine data-types in a cleaner and less volatile manner. (See use-case that
can be improved with this PR:
https://github.com/nelmio/NelmioApiDocBundle/blob/master/Formatter/AbstractFormatter.php#L103)

This is possible by the addition two properties to each property item in
`response`, and `parameters` fields in each API endpoint produced by the
`ApiDocExtractor`:

* `actualType` Contains a value from one of the `DataTypes` class constants.

* `subType` Can contain either `null`, or any other `DataTypes` class constant.
This is relevant when the `actualType` is a `DataTypes::COLLECTION`, wherein
`subType` would specify the type of the collection items. It is also relevant
when `actualType` is a `DataTypes::MODEL`, wherein `subType` would contain an
identifier of the model (the FQCN or anything the parser would wish to specify)

Examples:

```php

array(
    'id' => array(
        'dataType' => 'integer',
        'actualType' => DataTypes::INTEGER,
        'subType' => null,
    ),
    'profile' => array(
        'dataType' => 'object (Profile)',
        'actualType' => DataTypes::MODEL,
        'subType' => 'Foo\Entity\Profile',
        'children' => array(
            'name' => array(
                'dataType' => 'string',
                'actualType' => DataTypes::STRING,
                'subType' => null,
             ),
            'birthDate' => array(
                'dataType' => 'date',
                'actualType' => DataTypes::DATE,
                'subType' => null,
            ),
        )
    ),
    'languages' => array(
        'dataType' => 'array of strings',
        'actualType' => DataTypes::COLLECTION,
        'subType' => DataTypes::STRING,
    ),
    'roles' => array(
        'dataType' => 'array of choices',
        'actualType' => DataTypes::COLLECTION,
        'subType' => DataTypes::ENUM,
    ),
    'groups' => array(
        'dataType' => 'array of objects (Group)',
        'actualType' => DataTypes::COLLECTION,
        'subType' => 'Foo\Entity\Group',
    ),
    'profileRevisions' => array(
         'dataType' => 'array of objects (Profile)',
         'actualType' => DataTypes::COLLECTION,
         'subType' => 'Foo\Entity\Profile',
    ),
    'address' => array(
        'dataType' => 'object (a_type_a_custom_JMS_serializer_handler_handles)',
        'actualType' => DataTypes::MODEL,
        'subType' => 'a_type_a_custom_JMS_serializer_handler_handles',
    ),
);
```

When a formatter omits the `dataType` property or leaves it blank, it is
inferred within `ApiDocExtractor` before everything is passed to formatters.
2014-06-25 09:05:48 +02:00
William DURAND
b48650a9e0 Fix CS 2.6.0 2014-06-25 08:52:01 +02:00
William Durand
87b690d5e1 Merge pull request #409 from stof/patch-2
Simplified the Travis configuration
2014-06-25 08:51:55 +02:00
Christophe Coevoet
8d3fd662bf Fixed the retrieval of the validation MetadataFactory
The service is private so getting it from the container get() method is invalid and it does not work anymore in Symfony 2.5 because the service gets inlined.
2014-06-18 09:38:16 +02:00
Christophe Coevoet
df1c85ae5e Simplified the Travis configuration
The tests against specific Symfony versions are now running only for a single PHP version to limit the number of jobs in the build matrix. They are also installing the full Symfony repo to be sure that all components are actually at the specified version without the need to require each of them explicitly.
2014-06-17 19:01:48 +02:00
William Durand
56124e7c40 Merge pull request #395 from fechu/master
Implement tags in ApiDoc annotation.
2014-06-01 15:56:45 +02:00
Sandro Meier
106b42530c Add documentation for tag property 2014-05-27 19:33:52 +02:00
Sandro Meier
dfd094371d Implement Tags for functions. 2014-05-27 13:33:50 +02:00
William Durand
dfb089f993 Merge pull request #392 from marco-jantke/submit-on-enter-sandbox-mode
Pressing enter in the sandbox mode will now lead to submit the form.
2014-05-26 10:51:28 +02:00
Marco Jantke
d7c70720b0 Pressing enter in the sandbox mode will now lead to submit the form. 2014-05-23 15:30:21 +02:00
Yosh de Vos
624802b57a Added configuration to disable body formats 2014-05-21 15:59:55 +02:00
William Durand
221f109ad6 Merge pull request #386 from marco-jantke/window-location-hash-fix
Remove hash when closing a method container again. Added small hash help...
2014-05-19 12:03:46 +02:00
William Durand
3771e2d834 Merge pull request #385 from yoshz/master
Added request formats configuration
2014-05-19 10:45:49 +02:00
Yosh de Vos
8402c748ee Added request formats configuration 2014-05-18 21:25:30 +02:00
Marco Jantke
df7be182cd Remove hash when closing a method container again. Added small hash helper functions. 2014-05-18 01:24:52 +02:00
William Durand
968a162544 Merge pull request #365 from pyrech/master
Fix #357 - doc broken with Validator Constraints in FOSRestBundle requirements
2014-05-16 23:52:41 +02:00
Loick Piera
d0149c65ab fix #357 2014-05-16 22:04:24 +02:00
William DURAND
fa92011126 fix cs 2.5.2 2014-05-16 11:33:58 +02:00
William Durand
a88e7d8278 Merge pull request #381 from mvdbos/master
Only render sandbox config if  the sandbox is enabled
2014-05-15 19:01:35 +02:00
Matthijs van den Bos
86d9c31340 Only show sandbox config if enabled 2014-05-14 22:05:03 +02:00
William Durand
493963f0c0 Merge pull request #375 from merk/2.5-fix
Fix ValidatorParser in symfony 2.5
2014-05-12 12:01:33 -04:00
William Durand
36c223ab3a Merge pull request #329 from maxromanovsky/form-type-parser-improvements
Form Parser improvements for date, datetime & choice form types (format & types)
2014-05-12 11:56:00 -04:00
Tim Nagel
c366ffba84 Fix ValidatorParser in symfony 2.5
Fixes #373
2014-04-30 22:18:06 +10:00
Emmanuel BALLERY
0a42d1773c Fix wrong HTML structure a>div 2014-04-24 23:02:56 +02:00
Emmanuel BALLERY
7150ac17de Remove duplicate HTML ID 2014-04-24 23:00:13 +02:00
Emmanuel BALLERY
f2b606fc23 Fix wrong HTML structure ul>li 2014-04-24 22:59:12 +02:00
Emmanuel BALLERY
c78466bbb9 Fix wrong HTML tag 2014-04-24 22:58:34 +02:00
William Durand
1c553e93ec Merge pull request #363 from cedriclombardot/fix-model-type
Fix parse of input forms with options required
2014-04-23 12:13:35 +02:00
Cedric LOMBARDOT
4181079d8b Fix parse of input forms with options required
When form like model type was parsed this pass the required 'class' option to enable the build of the class
2014-04-11 09:45:35 +00:00
Max Romanovsky
b4fa6013cd Form Parser improvements for date, datetime & choice form types (format & types) 2014-04-04 13:52:12 +03:00
William Durand
fd126c1a01 Merge pull request #359 from aybbou/patch-1
Added a missing 'is'.
2014-03-28 13:48:20 +01:00
Ayyoub BOUMYA
e6cf2ff0d2 Added a missing 'is'. 2014-03-28 10:46:38 +00:00
Samuel ROZE
3f66888f00 Add PostParserInterface to JmsMetadataParser to get ValidatorParser found children parsed. 2014-03-20 16:39:36 +01:00
William Durand
eddba56c66 Merge pull request #348 from tonivdv/fix_https_reload_scheme
Sandbox should not be disabled in https whenever a method is not marked as https explictly
2.5.1
2014-03-12 14:46:04 +01:00
Toni Van de Voorde
04c03e3e06 Sandbox should not be disabled in https whenever a method is not marked as
https explictly
2014-03-11 10:24:56 +01:00
Alexey Kupershtokh
11f163d589 Show web profiler link in sandbox 2014-03-11 07:07:35 +07:00
William Durand
855f95afd1 Merge pull request #347 from h4cc/master
Testing against HHVM and PHP 5.6
2014-03-10 10:04:00 +01:00
Julius Beckmann
56f8c43849 Added PHP 5.6 and HHVM to Travis.
Modified RequestListenerTest so it does not use the Crawler, that currently does not work with HHVM.
2014-03-03 18:44:37 +01:00
William Durand
eca9d25ca7 Merge pull request #339 from mvrhov/michelfMarkdown
Replace deprecated fork of dflydev's mardown library with the original o...
2014-02-19 22:34:43 +01:00
Miha Vrhovnik
457df811e2 Replace deprecated fork of dflydev's mardown library with the original one provided by Michel Fortin 2014-02-19 12:55:16 +01:00
William DURAND
ee68eabe0c Prepare 2.5.0 release 2.5.0 2014-02-11 16:44:12 +01:00
William Durand
5bd455f955 Merge pull request #333 from richardfullmer/https
Fix and properly document the https option
2014-02-07 01:05:59 +01:00