mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-03-10 01:26:09 +03:00
remove unused https annotation param
This commit is contained in:
parent
e7c9fd4f56
commit
990b781322
@ -125,11 +125,6 @@ class ApiDoc
|
|||||||
*/
|
*/
|
||||||
private $route;
|
private $route;
|
||||||
|
|
||||||
/**
|
|
||||||
* @var bool
|
|
||||||
*/
|
|
||||||
private $https = false;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
@ -288,10 +283,6 @@ class ApiDoc
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($data['https'])) {
|
|
||||||
$this->https = $data['https'];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($data['resourceDescription'])) {
|
if (isset($data['resourceDescription'])) {
|
||||||
$this->resourceDescription = $data['resourceDescription'];
|
$this->resourceDescription = $data['resourceDescription'];
|
||||||
}
|
}
|
||||||
@ -522,22 +513,6 @@ class ApiDoc
|
|||||||
$this->host = $host;
|
$this->host = $host;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
public function getHttps()
|
|
||||||
{
|
|
||||||
return $this->https;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param bool $https
|
|
||||||
*/
|
|
||||||
public function setHttps($https): void
|
|
||||||
{
|
|
||||||
$this->https = $https;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
@ -698,7 +673,6 @@ class ApiDoc
|
|||||||
$data['resourceDescription'] = $resourceDescription;
|
$data['resourceDescription'] = $resourceDescription;
|
||||||
}
|
}
|
||||||
|
|
||||||
$data['https'] = $this->https;
|
|
||||||
$data['deprecated'] = $this->deprecated;
|
$data['deprecated'] = $this->deprecated;
|
||||||
$data['scope'] = $this->scope;
|
$data['scope'] = $this->scope;
|
||||||
|
|
||||||
|
@ -54,15 +54,6 @@ class PhpDocHandler implements HandlerInterface
|
|||||||
'description' => '',
|
'description' => '',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ('_scheme' === $name) {
|
|
||||||
$https = ('https' == $value);
|
|
||||||
$annotation->setHttps($https);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (method_exists($route, 'getSchemes')) {
|
|
||||||
$annotation->setHttps(in_array('https', $route->getSchemes()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$paramDocs = [];
|
$paramDocs = [];
|
||||||
|
@ -65,8 +65,6 @@ The following properties are available:
|
|||||||
* ``resource``: whether the method describes a main resource or not (default:
|
* ``resource``: whether the method describes a main resource or not (default:
|
||||||
``false``);
|
``false``);
|
||||||
* ``description``: a description of the API method;
|
* ``description``: a description of the API method;
|
||||||
* ``https``: whether the method described requires the https protocol (default:
|
|
||||||
``false``);
|
|
||||||
* ``deprecated``: allow to set method as deprecated (default: ``false``);
|
* ``deprecated``: allow to set method as deprecated (default: ``false``);
|
||||||
* ``tags``: allow to tag a method (e.g. ``beta`` or ``in-development``). Either
|
* ``tags``: allow to tag a method (e.g. ``beta`` or ``in-development``). Either
|
||||||
a single tag or an array of tags. Each tag can have an optional hex colorcode
|
a single tag or an array of tags. Each tag can have an optional hex colorcode
|
||||||
|
@ -11,10 +11,6 @@
|
|||||||
</span>
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if data.https %}
|
|
||||||
<span class="icon lock" title="HTTPS"></span>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<span class="path">
|
<span class="path">
|
||||||
{% if data.host is defined -%}
|
{% if data.host is defined -%}
|
||||||
{{ data.https ? 'https://' : 'http://' -}}
|
{{ data.https ? 'https://' : 'http://' -}}
|
||||||
@ -231,9 +227,9 @@
|
|||||||
{% if enableSandbox %}
|
{% if enableSandbox %}
|
||||||
<div class="pane sandbox">
|
<div class="pane sandbox">
|
||||||
{% if app.request is not null and data.https and app.request.secure != data.https %}
|
{% if app.request is not null and data.https and app.request.secure != data.https %}
|
||||||
Please reload the documentation using the scheme {% if data.https %}HTTPS{% else %}HTTP{% endif %} if you want to use the sandbox.
|
Please reload the documentation using the scheme HTTP if you want to use the sandbox.
|
||||||
{% else %}
|
{% else %}
|
||||||
<form method="" action="{% if data.host is defined %}{{ data.https ? 'https://' : 'http://' }}{{ data.host }}{% endif %}{{ data.uri }}">
|
<form method="" action="{% if data.host is defined %}http://{{ data.host }}{% endif %}{{ data.uri }}">
|
||||||
<fieldset class="parameters">
|
<fieldset class="parameters">
|
||||||
<legend>Input</legend>
|
<legend>Input</legend>
|
||||||
{% if data.requirements is defined %}
|
{% if data.requirements is defined %}
|
||||||
|
@ -17,7 +17,7 @@ use Nelmio\ApiDocBundle\Tests\WebTestCase;
|
|||||||
|
|
||||||
class ApiDocExtractorTest extends WebTestCase
|
class ApiDocExtractorTest extends WebTestCase
|
||||||
{
|
{
|
||||||
private static $ROUTES_QUANTITY_DEFAULT = 27; // Routes in the default view
|
private static $ROUTES_QUANTITY_DEFAULT = 26; // Routes in the default view
|
||||||
private static $ROUTES_QUANTITY_PREMIUM = 5; // Routes in the premium view
|
private static $ROUTES_QUANTITY_PREMIUM = 5; // Routes in the premium view
|
||||||
private static $ROUTES_QUANTITY_TEST = 2; // Routes in the test view
|
private static $ROUTES_QUANTITY_TEST = 2; // Routes in the test view
|
||||||
|
|
||||||
|
@ -145,13 +145,6 @@ class TestController
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @ApiDoc()
|
|
||||||
*/
|
|
||||||
public function secureRouteAction(): void
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ApiDoc()
|
* @ApiDoc()
|
||||||
*/
|
*/
|
||||||
|
@ -42,11 +42,6 @@ test_route_10:
|
|||||||
methods: [GET]
|
methods: [GET]
|
||||||
defaults: { _controller: Nelmio\ApiDocBundle\Tests\Fixtures\Controller\TestController::jmsReturnTestAction }
|
defaults: { _controller: Nelmio\ApiDocBundle\Tests\Fixtures\Controller\TestController::jmsReturnTestAction }
|
||||||
|
|
||||||
test_route_12:
|
|
||||||
path: /secure-route
|
|
||||||
schemes: [https]
|
|
||||||
defaults: { _controller: Nelmio\ApiDocBundle\Tests\Fixtures\Controller\TestController::secureRouteAction }
|
|
||||||
|
|
||||||
test_service_route_1:
|
test_service_route_1:
|
||||||
path: /tests.{_format}
|
path: /tests.{_format}
|
||||||
methods: [GET]
|
methods: [GET]
|
||||||
|
@ -58,7 +58,6 @@ class SimpleFormatterTest extends WebTestCase
|
|||||||
'requirements' => [
|
'requirements' => [
|
||||||
'_format' => ['dataType' => '', 'description' => '', 'requirement' => ''],
|
'_format' => ['dataType' => '', 'description' => '', 'requirement' => ''],
|
||||||
],
|
],
|
||||||
'https' => false,
|
|
||||||
'deprecated' => false,
|
'deprecated' => false,
|
||||||
'scope' => null,
|
'scope' => null,
|
||||||
];
|
];
|
||||||
|
@ -682,10 +682,6 @@ _Route with host placeholder_
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
### `ANY` /secure-route ###
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### `GET` /with-link ###
|
### `GET` /with-link ###
|
||||||
|
|
||||||
|
|
||||||
|
@ -285,7 +285,6 @@ With multiple lines.',
|
|||||||
],
|
],
|
||||||
],
|
],
|
||||||
'resourceDescription' => 'Operations on another resource.',
|
'resourceDescription' => 'Operations on another resource.',
|
||||||
'https' => false,
|
|
||||||
'deprecated' => false,
|
'deprecated' => false,
|
||||||
'scope' => null,
|
'scope' => null,
|
||||||
],
|
],
|
||||||
@ -305,7 +304,6 @@ With multiple lines.',
|
|||||||
'description' => '',
|
'description' => '',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'https' => false,
|
|
||||||
'deprecated' => false,
|
'deprecated' => false,
|
||||||
'scope' => null,
|
'scope' => null,
|
||||||
],
|
],
|
||||||
@ -374,7 +372,6 @@ With multiple lines.',
|
|||||||
],
|
],
|
||||||
],
|
],
|
||||||
'resourceDescription' => 'Operations on resource.',
|
'resourceDescription' => 'Operations on resource.',
|
||||||
'https' => false,
|
|
||||||
'deprecated' => false,
|
'deprecated' => false,
|
||||||
'scope' => null,
|
'scope' => null,
|
||||||
],
|
],
|
||||||
@ -810,7 +807,6 @@ With multiple lines.',
|
|||||||
'untilVersion' => '0.5',
|
'untilVersion' => '0.5',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'https' => false,
|
|
||||||
'deprecated' => false,
|
'deprecated' => false,
|
||||||
'scope' => null,
|
'scope' => null,
|
||||||
],
|
],
|
||||||
@ -830,7 +826,6 @@ With multiple lines.',
|
|||||||
'description' => '',
|
'description' => '',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'https' => false,
|
|
||||||
'deprecated' => false,
|
'deprecated' => false,
|
||||||
'scope' => null,
|
'scope' => null,
|
||||||
],
|
],
|
||||||
@ -850,7 +845,6 @@ With multiple lines.',
|
|||||||
'description' => '',
|
'description' => '',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'https' => false,
|
|
||||||
'deprecated' => false,
|
'deprecated' => false,
|
||||||
'scope' => null,
|
'scope' => null,
|
||||||
],
|
],
|
||||||
@ -879,7 +873,6 @@ With multiple lines.',
|
|||||||
'description' => '',
|
'description' => '',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'https' => false,
|
|
||||||
'deprecated' => false,
|
'deprecated' => false,
|
||||||
'scope' => null,
|
'scope' => null,
|
||||||
],
|
],
|
||||||
@ -937,7 +930,6 @@ With multiple lines.',
|
|||||||
0 => 'default',
|
0 => 'default',
|
||||||
1 => 'premium',
|
1 => 'premium',
|
||||||
],
|
],
|
||||||
'https' => false,
|
|
||||||
'deprecated' => false,
|
'deprecated' => false,
|
||||||
'scope' => null,
|
'scope' => null,
|
||||||
],
|
],
|
||||||
@ -958,7 +950,6 @@ With multiple lines.',
|
|||||||
0 => 'default',
|
0 => 'default',
|
||||||
1 => 'premium',
|
1 => 'premium',
|
||||||
],
|
],
|
||||||
'https' => false,
|
|
||||||
'deprecated' => false,
|
'deprecated' => false,
|
||||||
'scope' => null,
|
'scope' => null,
|
||||||
],
|
],
|
||||||
@ -970,7 +961,6 @@ With multiple lines.',
|
|||||||
'views' => [
|
'views' => [
|
||||||
0 => 'default',
|
0 => 'default',
|
||||||
],
|
],
|
||||||
'https' => false,
|
|
||||||
'deprecated' => false,
|
'deprecated' => false,
|
||||||
'scope' => null,
|
'scope' => null,
|
||||||
],
|
],
|
||||||
@ -1006,7 +996,6 @@ With multiple lines.',
|
|||||||
0 => 'default',
|
0 => 'default',
|
||||||
1 => 'test',
|
1 => 'test',
|
||||||
],
|
],
|
||||||
'https' => false,
|
|
||||||
'deprecated' => false,
|
'deprecated' => false,
|
||||||
'scope' => null,
|
'scope' => null,
|
||||||
],
|
],
|
||||||
@ -1021,7 +1010,6 @@ With multiple lines.',
|
|||||||
'description' => '',
|
'description' => '',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'https' => false,
|
|
||||||
'deprecated' => false,
|
'deprecated' => false,
|
||||||
'scope' => null,
|
'scope' => null,
|
||||||
],
|
],
|
||||||
@ -1285,7 +1273,6 @@ With multiple lines.',
|
|||||||
'untilVersion' => null,
|
'untilVersion' => null,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'https' => false,
|
|
||||||
'deprecated' => false,
|
'deprecated' => false,
|
||||||
'scope' => null,
|
'scope' => null,
|
||||||
],
|
],
|
||||||
@ -1315,7 +1302,6 @@ With multiple lines.',
|
|||||||
],
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'https' => false,
|
|
||||||
'deprecated' => false,
|
'deprecated' => false,
|
||||||
'scope' => null,
|
'scope' => null,
|
||||||
],
|
],
|
||||||
@ -1347,7 +1333,6 @@ And, it supports multilines until the first \'@\' char.',
|
|||||||
'requirement' => '',
|
'requirement' => '',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'https' => false,
|
|
||||||
'deprecated' => false,
|
'deprecated' => false,
|
||||||
'scope' => null,
|
'scope' => null,
|
||||||
],
|
],
|
||||||
@ -1610,7 +1595,6 @@ With multiple lines.',
|
|||||||
'untilVersion' => null,
|
'untilVersion' => null,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'https' => false,
|
|
||||||
'deprecated' => false,
|
'deprecated' => false,
|
||||||
'scope' => null,
|
'scope' => null,
|
||||||
],
|
],
|
||||||
@ -1634,26 +1618,17 @@ With multiple lines.',
|
|||||||
'views' => [
|
'views' => [
|
||||||
0 => 'default',
|
0 => 'default',
|
||||||
],
|
],
|
||||||
'https' => false,
|
|
||||||
'deprecated' => false,
|
'deprecated' => false,
|
||||||
'scope' => null,
|
'scope' => null,
|
||||||
],
|
],
|
||||||
7 => [
|
7 => [
|
||||||
'method' => 'ANY',
|
'method' => 'GET',
|
||||||
'uri' => '/secure-route',
|
'uri' => '/with-link',
|
||||||
'https' => true,
|
'link' => 'http://symfony.com',
|
||||||
'deprecated' => false,
|
'deprecated' => false,
|
||||||
'scope' => null,
|
'scope' => null,
|
||||||
],
|
],
|
||||||
8 => [
|
8 => [
|
||||||
'method' => 'GET',
|
|
||||||
'uri' => '/with-link',
|
|
||||||
'link' => 'http://symfony.com',
|
|
||||||
'https' => false,
|
|
||||||
'deprecated' => false,
|
|
||||||
'scope' => null,
|
|
||||||
],
|
|
||||||
9 => [
|
|
||||||
'method' => 'ANY',
|
'method' => 'ANY',
|
||||||
'uri' => '/yet-another/{id}',
|
'uri' => '/yet-another/{id}',
|
||||||
'requirements' => [
|
'requirements' => [
|
||||||
@ -1663,18 +1638,16 @@ With multiple lines.',
|
|||||||
'description' => '',
|
'description' => '',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'https' => false,
|
|
||||||
'deprecated' => false,
|
'deprecated' => false,
|
||||||
'scope' => null,
|
'scope' => null,
|
||||||
],
|
],
|
||||||
10 => [
|
9 => [
|
||||||
'method' => 'GET',
|
'method' => 'GET',
|
||||||
'uri' => '/z-action-with-deprecated-indicator',
|
'uri' => '/z-action-with-deprecated-indicator',
|
||||||
'https' => false,
|
|
||||||
'deprecated' => true,
|
'deprecated' => true,
|
||||||
'scope' => null,
|
'scope' => null,
|
||||||
],
|
],
|
||||||
11 => [
|
10 => [
|
||||||
'method' => 'ANY',
|
'method' => 'ANY',
|
||||||
'uri' => '/z-return-jms-and-validator-output',
|
'uri' => '/z-return-jms-and-validator-output',
|
||||||
'response' => [
|
'response' => [
|
||||||
@ -1787,11 +1760,10 @@ With multiple lines.',
|
|||||||
],
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'https' => false,
|
|
||||||
'deprecated' => false,
|
'deprecated' => false,
|
||||||
'scope' => null,
|
'scope' => null,
|
||||||
],
|
],
|
||||||
12 => [
|
11 => [
|
||||||
'method' => 'ANY',
|
'method' => 'ANY',
|
||||||
'uri' => '/z-return-selected-parsers-input',
|
'uri' => '/z-return-selected-parsers-input',
|
||||||
'parameters' => [
|
'parameters' => [
|
||||||
@ -1832,11 +1804,10 @@ With multiple lines.',
|
|||||||
'readonly' => false,
|
'readonly' => false,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'https' => false,
|
|
||||||
'deprecated' => false,
|
'deprecated' => false,
|
||||||
'scope' => null,
|
'scope' => null,
|
||||||
],
|
],
|
||||||
13 => [
|
12 => [
|
||||||
'method' => 'ANY',
|
'method' => 'ANY',
|
||||||
'uri' => '/z-return-selected-parsers-output',
|
'uri' => '/z-return-selected-parsers-output',
|
||||||
'response' => [
|
'response' => [
|
||||||
@ -1949,25 +1920,22 @@ With multiple lines.',
|
|||||||
],
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'https' => false,
|
'deprecated' => false,
|
||||||
|
'scope' => null,
|
||||||
|
],
|
||||||
|
13 => [
|
||||||
|
'method' => 'POST',
|
||||||
|
'uri' => '/zcached',
|
||||||
'deprecated' => false,
|
'deprecated' => false,
|
||||||
'scope' => null,
|
'scope' => null,
|
||||||
],
|
],
|
||||||
14 => [
|
14 => [
|
||||||
'method' => 'POST',
|
'method' => 'POST',
|
||||||
'uri' => '/zcached',
|
'uri' => '/zsecured',
|
||||||
'https' => false,
|
|
||||||
'deprecated' => false,
|
'deprecated' => false,
|
||||||
'scope' => null,
|
'scope' => null,
|
||||||
],
|
],
|
||||||
15 => [
|
15 => [
|
||||||
'method' => 'POST',
|
|
||||||
'uri' => '/zsecured',
|
|
||||||
'https' => false,
|
|
||||||
'deprecated' => false,
|
|
||||||
'scope' => null,
|
|
||||||
],
|
|
||||||
16 => [
|
|
||||||
'method' => 'GET',
|
'method' => 'GET',
|
||||||
'uri' => '/zz-tests-route-version.{_format}',
|
'uri' => '/zz-tests-route-version.{_format}',
|
||||||
'requirements' => [
|
'requirements' => [
|
||||||
@ -1977,7 +1945,6 @@ With multiple lines.',
|
|||||||
'description' => '',
|
'description' => '',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'https' => false,
|
|
||||||
'deprecated' => false,
|
'deprecated' => false,
|
||||||
'scope' => null,
|
'scope' => null,
|
||||||
],
|
],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user