ok looks OK
This commit is contained in:
parent
f5decffe3f
commit
ca2541da48
3 changed files with 38 additions and 13 deletions
|
@ -8,6 +8,7 @@ get:
|
||||||
application/json:
|
application/json:
|
||||||
example: !include ../examples/metacodes.json
|
example: !include ../examples/metacodes.json
|
||||||
/{id}:
|
/{id}:
|
||||||
|
securedBy: [ null, cookie, token, oauth_2_0 ]
|
||||||
#type: item
|
#type: item
|
||||||
get:
|
get:
|
||||||
responses:
|
responses:
|
||||||
|
|
|
@ -7,6 +7,15 @@ get:
|
||||||
body:
|
body:
|
||||||
application/json:
|
application/json:
|
||||||
example: !include ../examples/users.json
|
example: !include ../examples/users.json
|
||||||
|
/{id}:
|
||||||
|
#type: item
|
||||||
|
securedBy: [ null, cookie, token, oauth_2_0 ]
|
||||||
|
get:
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
body:
|
||||||
|
application/json:
|
||||||
|
example: !include ../examples/user.json
|
||||||
/current:
|
/current:
|
||||||
#type: item
|
#type: item
|
||||||
get:
|
get:
|
||||||
|
@ -15,11 +24,3 @@ get:
|
||||||
body:
|
body:
|
||||||
application/json:
|
application/json:
|
||||||
example: !include ../examples/current_user.json
|
example: !include ../examples/current_user.json
|
||||||
/{id}:
|
|
||||||
#type: item
|
|
||||||
get:
|
|
||||||
responses:
|
|
||||||
200:
|
|
||||||
body:
|
|
||||||
application/json:
|
|
||||||
example: !include ../examples/user.json
|
|
||||||
|
|
|
@ -9,7 +9,14 @@
|
||||||
<span class="methods">
|
<span class="methods">
|
||||||
{% for method in resource.methods %}
|
{% for method in resource.methods %}
|
||||||
<a href="#{{ resource.uniqueId }}_{{ method.method }}"><!-- modal shown by hashchange event -->
|
<a href="#{{ resource.uniqueId }}_{{ method.method }}"><!-- modal shown by hashchange event -->
|
||||||
<span class="badge badge_{{ method.method }}">{{ method.method }}{% if method.securedBy.length %} <span class="glyphicon glyphicon-lock" title="Authentication required"></span>{% endif %}</span>
|
<span class="badge badge_{{ method.method }}">{{ method.method }}
|
||||||
|
{% if method.securedBy.length %}
|
||||||
|
{% if method.securedBy | first == null %}
|
||||||
|
<span class="glyphicon glyphicon-transfer" title="Authentication not required"></span>
|
||||||
|
{% endif %}
|
||||||
|
<span class="glyphicon glyphicon-lock" title="Authentication required"></span>
|
||||||
|
{% endif %}
|
||||||
|
</span>
|
||||||
</a>
|
</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</span>
|
</span>
|
||||||
|
@ -31,7 +38,15 @@
|
||||||
<div class="list-group">
|
<div class="list-group">
|
||||||
{% for method in resource.methods %}
|
{% for method in resource.methods %}
|
||||||
<div onclick="window.location.href = '#{{ resource.uniqueId }}_{{ method.method }}'" class="list-group-item">
|
<div onclick="window.location.href = '#{{ resource.uniqueId }}_{{ method.method }}'" class="list-group-item">
|
||||||
<span class="badge badge_{{ method.method }}">{{ method.method }}{% if method.securedBy.length %} <span class="glyphicon glyphicon-lock" title="Authentication required"></span>{% endif %}</span>
|
<span class="badge badge_{{ method.method }}">
|
||||||
|
{{ method.method }}
|
||||||
|
{% if method.securedBy.length %}
|
||||||
|
{% if method.securedBy | first == null %}
|
||||||
|
<span class="glyphicon glyphicon-transfer" title="Authentication not required"></span>
|
||||||
|
{% endif %}
|
||||||
|
<span class="glyphicon glyphicon-lock" title="Authentication required"></span>
|
||||||
|
{% endif %}
|
||||||
|
</span>
|
||||||
<div class="method_description">
|
<div class="method_description">
|
||||||
{% markdown %}
|
{% markdown %}
|
||||||
{{ method.description}}
|
{{ method.description}}
|
||||||
|
@ -51,7 +66,15 @@
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||||
<h4 class="modal-title" id="myModalLabel">
|
<h4 class="modal-title" id="myModalLabel">
|
||||||
<span class="badge badge_{{ method.method }}">{{ method.method }}{% if method.securedBy.length %} <span class="glyphicon glyphicon-lock" title="Authentication required"></span>{% endif %}</span>
|
<span class="badge badge_{{ method.method }}">
|
||||||
|
{{ method.method }}
|
||||||
|
{% if method.securedBy.length %}
|
||||||
|
{% if method.securedBy | first == null %}
|
||||||
|
<span class="glyphicon glyphicon-transfer" title="Authentication not required"></span>
|
||||||
|
{% endif %}
|
||||||
|
<span class="glyphicon glyphicon-lock" title="Authentication required"></span>
|
||||||
|
{% endif %}
|
||||||
|
</span>
|
||||||
<span class="parent">{{ resource.parentUrl }}</span>{{ resource.relativeUri }}
|
<span class="parent">{{ resource.parentUrl }}</span>{{ resource.relativeUri }}
|
||||||
</h4>
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
|
@ -234,8 +257,8 @@
|
||||||
{% for securedBy in method.securedBy %}
|
{% for securedBy in method.securedBy %}
|
||||||
{% if securedBy == null %}
|
{% if securedBy == null %}
|
||||||
<div class="alert alert-info">
|
<div class="alert alert-info">
|
||||||
<span class="glyphicon glyphicon-unlock" title="Authentication not required"></span>
|
<span class="glyphicon glyphicon-transfer" title="Authentication not required"></span>
|
||||||
This route can be access anonymously.</h1>
|
This route can be accessed anonymously.</h1>
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
{% set securityScheme = securitySchemes[securedBy] %}
|
{% set securityScheme = securitySchemes[securedBy] %}
|
||||||
|
|
Loading…
Add table
Reference in a new issue