diff --git a/doc/api/apis/metacodes.raml b/doc/api/apis/metacodes.raml index d2b5b63c..877e1835 100644 --- a/doc/api/apis/metacodes.raml +++ b/doc/api/apis/metacodes.raml @@ -8,6 +8,7 @@ get: application/json: example: !include ../examples/metacodes.json /{id}: + securedBy: [ null, cookie, token, oauth_2_0 ] #type: item get: responses: diff --git a/doc/api/apis/users.raml b/doc/api/apis/users.raml index 6d1bc97d..1d37bc0d 100644 --- a/doc/api/apis/users.raml +++ b/doc/api/apis/users.raml @@ -7,6 +7,15 @@ get: body: application/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: #type: item get: @@ -15,11 +24,3 @@ get: body: application/json: example: !include ../examples/current_user.json -/{id}: - #type: item - get: - responses: - 200: - body: - application/json: - example: !include ../examples/user.json diff --git a/doc/api/templates/resource.nunjucks b/doc/api/templates/resource.nunjucks index 65d96453..6bdaf2a6 100644 --- a/doc/api/templates/resource.nunjucks +++ b/doc/api/templates/resource.nunjucks @@ -9,7 +9,14 @@ {% for method in resource.methods %} - {{ method.method }}{% if method.securedBy.length %} {% endif %} + {{ method.method }} + {% if method.securedBy.length %} + {% if method.securedBy | first == null %} + + {% endif %} + + {% endif %} + {% endfor %} @@ -31,7 +38,15 @@
{% for method in resource.methods %}
- {{ method.method }}{% if method.securedBy.length %} {% endif %} + + {{ method.method }} + {% if method.securedBy.length %} + {% if method.securedBy | first == null %} + + {% endif %} + + {% endif %} +
{% markdown %} {{ method.description}} @@ -51,7 +66,15 @@ @@ -234,8 +257,8 @@ {% for securedBy in method.securedBy %} {% if securedBy == null %}
- - This route can be access anonymously. + + This route can be accessed anonymously.
{% else %} {% set securityScheme = securitySchemes[securedBy] %}