mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-02 23:59:26 +03:00
Merge PR #299 from SimonSimCity/https-fixes
Fix #266 Close #283 Close #299
This commit is contained in:
commit
6038fe842f
@ -47,7 +47,7 @@ class PhpDocHandler implements HandlerInterface
|
|||||||
// requirements
|
// requirements
|
||||||
$requirements = $annotation->getRequirements();
|
$requirements = $annotation->getRequirements();
|
||||||
foreach ($route->getRequirements() as $name => $value) {
|
foreach ($route->getRequirements() as $name => $value) {
|
||||||
if (!isset($requirements[$name]) && '_method' !== $name) {
|
if (!isset($requirements[$name]) && '_method' !== $name && '_scheme' !== $name) {
|
||||||
$requirements[$name] = array(
|
$requirements[$name] = array(
|
||||||
'requirement' => $value,
|
'requirement' => $value,
|
||||||
'dataType' => '',
|
'dataType' => '',
|
||||||
|
@ -193,6 +193,9 @@
|
|||||||
|
|
||||||
{% if enableSandbox %}
|
{% if enableSandbox %}
|
||||||
<div class="pane sandbox">
|
<div class="pane sandbox">
|
||||||
|
{% if 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.
|
||||||
|
{% else %}
|
||||||
<form method="{{ data.method|upper }}" action="{% if data.host is defined %}{{ data.https ? 'https://' : 'http://' }}{{ data.host }}{% endif %}{{ data.uri }}">
|
<form method="{{ data.method|upper }}" action="{% if data.host is defined %}{{ data.https ? 'https://' : 'http://' }}{{ data.host }}{% endif %}{{ data.uri }}">
|
||||||
<fieldset class="parameters">
|
<fieldset class="parameters">
|
||||||
<legend>Input</legend>
|
<legend>Input</legend>
|
||||||
@ -288,6 +291,7 @@
|
|||||||
<h4>Response Body <small>[<a href="" class="to-raw">Raw</a>]</small></h4>
|
<h4>Response Body <small>[<a href="" class="to-raw">Raw</a>]</small></h4>
|
||||||
<pre class="response prettyprint"></pre>
|
<pre class="response prettyprint"></pre>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
@ -401,12 +401,6 @@ nested_array[]:
|
|||||||
### `ANY` /secure-route ###
|
### `ANY` /secure-route ###
|
||||||
|
|
||||||
|
|
||||||
#### Requirements ####
|
|
||||||
|
|
||||||
**_scheme**
|
|
||||||
|
|
||||||
- Requirement: https
|
|
||||||
|
|
||||||
|
|
||||||
### `ANY` /yet-another/{id} ###
|
### `ANY` /yet-another/{id} ###
|
||||||
|
|
||||||
|
@ -707,15 +707,6 @@ With multiple lines.',
|
|||||||
array(
|
array(
|
||||||
'method' => 'ANY',
|
'method' => 'ANY',
|
||||||
'uri' => '/secure-route',
|
'uri' => '/secure-route',
|
||||||
'requirements' =>
|
|
||||||
array(
|
|
||||||
'_scheme' =>
|
|
||||||
array(
|
|
||||||
'requirement' => 'https',
|
|
||||||
'dataType' => '',
|
|
||||||
'description' => '',
|
|
||||||
),
|
|
||||||
),
|
|
||||||
'https' => true,
|
'https' => true,
|
||||||
'authentication' => false,
|
'authentication' => false,
|
||||||
'authenticationRoles' => array(),
|
'authenticationRoles' => array(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user