mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-02 15:51:48 +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 = $annotation->getRequirements();
|
||||
foreach ($route->getRequirements() as $name => $value) {
|
||||
if (!isset($requirements[$name]) && '_method' !== $name) {
|
||||
if (!isset($requirements[$name]) && '_method' !== $name && '_scheme' !== $name) {
|
||||
$requirements[$name] = array(
|
||||
'requirement' => $value,
|
||||
'dataType' => '',
|
||||
|
@ -193,6 +193,9 @@
|
||||
|
||||
{% if enableSandbox %}
|
||||
<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 }}">
|
||||
<fieldset class="parameters">
|
||||
<legend>Input</legend>
|
||||
@ -288,6 +291,7 @@
|
||||
<h4>Response Body <small>[<a href="" class="to-raw">Raw</a>]</small></h4>
|
||||
<pre class="response prettyprint"></pre>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
@ -401,12 +401,6 @@ nested_array[]:
|
||||
### `ANY` /secure-route ###
|
||||
|
||||
|
||||
#### Requirements ####
|
||||
|
||||
**_scheme**
|
||||
|
||||
- Requirement: https
|
||||
|
||||
|
||||
### `ANY` /yet-another/{id} ###
|
||||
|
||||
|
@ -707,15 +707,6 @@ With multiple lines.',
|
||||
array(
|
||||
'method' => 'ANY',
|
||||
'uri' => '/secure-route',
|
||||
'requirements' =>
|
||||
array(
|
||||
'_scheme' =>
|
||||
array(
|
||||
'requirement' => 'https',
|
||||
'dataType' => '',
|
||||
'description' => '',
|
||||
),
|
||||
),
|
||||
'https' => true,
|
||||
'authentication' => false,
|
||||
'authenticationRoles' => array(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user