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