777 Commits

Author SHA1 Message Date
Guilhem Niot
0fada289f5 Fix CS 2021-12-21 13:46:02 +01:00
Guilhem Niot
b4c74ee938 Fix retrieval of container in tests 2021-12-21 13:41:49 +01:00
Fabiano Roberto
e04521ebea Fix usage of configureRoutes in tests 2021-12-21 11:54:39 +01:00
Fabiano Roberto
2ade72d0aa feat(dependencies): #1913 - upgrade symfony 60 dependencies 2021-12-21 11:29:10 +01:00
Guilhem Niot
e15f3d272a Use an early version of Api-platform with symfony 6 support in one test case 2021-12-21 11:29:10 +01:00
Guilhem Niot
46822918a8
Merge pull request #1934 from nelmio/JMS4
Add support of JMS v4
2021-12-21 11:26:49 +01:00
Guilhem Niot
87e4183b9b Add support of JMS v4 2021-12-21 11:24:20 +01:00
Guilhem Niot
01807df254
Merge pull request #1928 from tgalopin/php81
Add PHP 8.1 in CI and better test supported Symfony minors
2021-12-19 11:31:53 +01:00
Titouan Galopin
736d7e8783 Add PHP 8.1 in CI and better test supported Symfony minors 2021-12-14 17:36:17 +01:00
Alexey Alshenetsky
7de49bb4a8
Add missing null check to ControllerReflector::getReflectionMethod (#1918)
* add null check

https://github.com/nelmio/NelmioApiDocBundle/issues/1909

* less code is better

* add tests for ControllerReflection::getReflectionMethod()

* lint fix

* style_ci fixes

Co-authored-by: Alexey <alshenestky@icloud.com>
2021-12-12 01:32:51 +01:00
jeremy
babf788636
Proposal: Add `header_block` Twig Block (#1896)
* Adding ``header_block`` Twig Block

In attempting to remove the default green header from the API docs (I am integrating the docs into a site that already has a header), I have found that the only possible way to do so is to overwrite the entire ``index.html.twig`` file.  This is because the existing ``{% header %}`` twig tags are placed *inside* the ``<header>`` HTML tags.  So, if one overrides the ``{% header %}`` block, it only adjusts the header content, as opposed to allowing control over the entire header object.

To resolve this problem I considered two methods:

- Move the existing ``{% header %}`` tags _*outside*_ of the ``<header>`` tags.  This would resolve the problem in the simplest fashion, but would be a breaking change for those currently overriding the block.

- Add a new twig block, placing its tags *_outside_* the existing ``<header>`` tags.  This would leave the existing functionality as-is, and would not break any current implementations.

I chose the latter for the reasons specified above, and suggested the name ``{% header_block %}``.  Thanks for considering this proposal.

* Add Location of Original Twig Template

This doc page advises that one can `have a look at the original template to see which blocks can be overridden`, but does not say where the original template can be found.  This edit adds that information so that users don't have to resort to searching for keywords (like I just had to).

Note that I haven't run any tests as this is a docs-only change.
2021-12-11 14:41:46 +01:00
Alexey Alshenetsky
14383f4ee5
Add support for zircore/swagger-php 4.0 (#1916)
* add zircore/swagger-php v4 to composer.json

* fix incompatibilities

* add compatibility with 3.2

* Apply fixes from StyleCI

* mark SetsContextTrait as internal

* Bump php version

Co-authored-by: Alexey <alshenestky@icloud.com>
Co-authored-by: Alexey Alshenetsky <alshenetsky@users.noreply.github.com>
Co-authored-by: Guilhem Niot <guilhem@gniot.fr>
2021-12-11 14:39:04 +01:00
Gemorroj
a041c69a0c
try fix #1876 (#1919) 2021-12-11 14:32:00 +01:00
Guilhem Niot
f5fb7a4088
Fix deprecations (#1924) 2021-12-11 14:22:14 +01:00
Guilhem Niot
a184cb8ef4
Fix deprecations (#1923) 2021-12-11 14:19:43 +01:00
Encre Informatique
4148dfda25
fixed : add doc blocks to silence Symfony deprecations (#1922)
* fixed : add doc blocks to silence Symfony deprecations

Symfony 5.4 returning deprecations about 
```
User Deprecated: Method "Twig\Extension\ExtensionInterface::getFunctions()" might add "array" as a native return type declaration in the future.
Do the same in implementation "Nelmio\ApiDocBundle\Render\Html\GetNelmioAsset" now to avoid errors or add an explicit @return annotation to suppress this message.
```

* fixed : native hint
2021-12-11 13:58:33 +01:00
Guilhem Niot
82bb3cb916
Fix usage of getCollectionValueTypes and getCollectionKeyTypes (#1910)
* Fix usage of getCollectionValueTypes and getCollectionKeyTypes

* fix cs
2021-11-30 13:06:32 +01:00
Vladislav
d59dbbd859
Issue 1848 operation id by route name (#1907)
* Fix #1885 update psr/log and psr/container

* Issue #1848 operation id by route name

Co-authored-by: Vlad Gaiduk <uahaiduk@gmail.com>
2021-11-22 20:18:16 +01:00
jeremy
0ed76d7d24
Add Location of Original Template (#1897)
This doc page advises that one can `have a look at the original template to see which blocks can be overridden`, but does not say where the original template can be found.  This edit adds that information so that users don't have to resort to searching for keywords (like I just had to).

Note that I haven't run any tests as this is a docs-only change.
2021-11-04 00:13:42 +01:00
Guilhem Niot
e16d1fedb9 Fix CS 2021-11-04 00:09:07 +01:00
Daniel Gelling
c0b57fd371
Apply #1863 to 3.x branch (#1888)
This also fixes #1877
2021-11-04 00:07:01 +01:00
Guilhem Niot
200ec0fdcb Merge branch '3.x' 2021-11-04 00:06:42 +01:00
Vladislav
35cf37e338
Fix #1885 update psr/log and psr/container (#1892)
Co-authored-by: Vlad Gaiduk <uahaiduk@gmail.com>
2021-11-03 23:57:21 +01:00
Guilhem Niot
a2775b5c10
Update outdated swagger annotations namespace (#1898) 2021-11-03 23:55:56 +01:00
Samaël tomas
efa83ca54e
Fix OpenApiRenderer list could be null (#1881)
Co-authored-by: Samael tomas <samael.tomas@wizbii.com>
2021-10-19 14:29:11 +02:00
Quentin Stoeckel
653a1f1776
Fix path to index.html.twig in documentation (#1883)
This fixes a minor typo in [*Re-add Google Fonts* part of the documentation](https://symfony.com/bundles/NelmioApiDocBundle/current/faq.html#re-add-google-fonts): using an uppercase `i` breaks template override.
2021-10-06 19:29:54 +02:00
Frederik Holz
aa18c6c83b
[3.x]: Hide the default section per area with new config parameter (#1868)
* Add new config node disable_default_routes to prevent registering RouteDescriber to specific areas which allowes disabling rendering of default routes, Adjust tests accordingly

* Add documentation for new config variable

* Change disable_default_routes to filter route collection instead of disabling route describer, Add test for new handling in FilteredRouteCollectionBuilder

* Change naming of matching method for disabling default routes

* Fix codestyle issue

* Fix codestyle issue

* Change naming of dataProvider to match testing name

Co-authored-by: Frederik Holz <team-orange@auxmoney.com>
2021-10-06 19:28:59 +02:00
Guilhem Niot
9c729ab7b7
Fix support without twig (#1878)
* fix support without twig

* Support null openApiRenderer

* Register a twig extension instead of registering twig function at runtime

* fix tests
2021-09-22 23:43:32 +02:00
Guilhem Niot
b53edda10c
Merge pull request #1842 from zdenekdrahos/html-dump
Dump documentation to a static HTML and YAML file
2021-09-03 20:28:19 +02:00
Guilhem Niot
67bd715eac
Merge pull request #1869 from Nemrtvej/mm-update-swagger-ui
Update swagger-ui to 3.52.0
2021-09-03 20:27:08 +02:00
Marek Makovec
d73dd8ffe3 Update swagger-ui to 3.52.0 2021-09-01 17:45:49 +02:00
Zdeněk Drahoš
22b1a7e8d1 Add @internal to renderer classes 2021-08-28 08:29:07 +02:00
Guilhem Niot
69d07979d3
symfony/property-info is a mandatory dependency 2021-08-27 17:20:17 +02:00
Guilhem Niot
2f25ca63e9
Merge pull request #1863 from onatskyy/fix_getCollectionValueType_deprecation
Fix Symfony\Component\PropertyInfo\Type::getCollectionValueType() deprecation notice for symfony >=5.3
2021-08-27 17:06:50 +02:00
Mathieu Ducrot
1306106931
Update templates comment path for bundle override (#1864)
## Changelog

Fix the comment path from SwaggerUI to SwaggerUi since case does matter for template override to work.
2021-08-23 12:06:14 +02:00
Alexander Onatskiy
0667881cdb Fix Symfony\Component\PropertyInfo\Type::getCollectionValueType() deprecation notice for symfony >=5.3 2021-08-18 16:12:47 +03:00
Martin Rademacher
74a440a2b1
Always provide a context to swagger-php (#1860)
The next swagger-php release will make `context` a required parameter
for `Analysis` and adding annotations to it.
2021-08-17 21:52:21 +02:00
Asmir Mustafic
985b43fb60
log name collisions (#1862) 2021-08-17 21:51:11 +02:00
Guilhem Niot
6ebb9cc9b4
Merge pull request #1861 from goetas/test-jms
Improve jms testing by checking that collisions are not generated
2021-08-16 16:40:54 +02:00
Asmir Mustafic
0bcdc59b88
add missing typehint 2021-08-16 15:19:26 +02:00
Asmir Mustafic
497afa1361
improve testing by checking explicitly that collisions are not generated 2021-08-16 13:11:59 +02:00
Guilhem Niot
478fb2efe0 Merge branch 3.x 2021-08-03 10:25:50 +02:00
Fabien Salathe
74036e974a Remove dead code
Removed an unused property
2021-08-03 10:24:24 +02:00
Guilhem Niot
c097e27b69
Merge pull request #1804 from JeResilieMonContrat-com/form_child_documentation
Display non native form type childs description and title properly
2021-08-03 09:37:16 +02:00
Guilhem Niot
be014ff11b
Merge pull request #1830 from nelmio/ADDPROP
Fix additionalProperties support
2021-08-03 09:35:12 +02:00
Zdeněk Drahoš
1a21f1855e Enable overriding server url for yaml and json export from console 2021-07-29 12:22:54 +02:00
Zdeněk Drahoš
181f4b2763 Keep server_url from Request only in RenderOpenApi 2021-07-29 12:11:10 +02:00
Zdeněk Drahoš
1f29be85f4 Use json renderer in controller 2021-07-29 12:01:54 +02:00
Zdeněk Drahoš
1b9be28ad6 Enable dumping docs to yaml 2021-07-29 11:57:00 +02:00
Guilhem Niot
06bc5136d7
Merge pull request #1851 from javiereguiluz/patch-3
[Doc] Fix some minor RST issues
2021-07-18 18:59:37 +02:00