Add response examples to OS-OAUTH1 api documentation

Add response examples to API documentation for following API
/v3/users/{user_id}/OS-OAUTH1/access_tokens/{access_token_id}/roles
/v3/users/{user_id}/OS-OAUTH1/access_tokens/{access_token_id}/roles/{role_id}

Change-Id: I380348d149fd917d636ef4e0e6589fffdedee2ab
Closes-Bug: #1686015
This commit is contained in:
Hemanth Nakkina 2017-04-25 12:06:03 +05:30
parent 6c6589d2b0
commit 3ad5228629
3 changed files with 47 additions and 0 deletions

View File

@ -409,6 +409,12 @@ Request
- user_id: user_id_path
- access_token_id: access_token_id_path
Response Example
----------------
.. literalinclude:: ./samples/OS-OAUTH1/access-token-roles-list-response.json
:language: javascript
Show role details for an access token
=====================================
@ -432,6 +438,12 @@ Request
- role_id: role_id_path
- access_token_id: access_token_id_path
Response Example
----------------
.. literalinclude:: ./samples/OS-OAUTH1/access-token-role-show-response.json
:language: javascript
Authenticate with Identity API
==============================

View File

@ -0,0 +1,10 @@
{
"role": {
"id": "5ad150",
"domain_id": "7cf37b",
"links": {
"self": "http://example.com/identity/v3/roles/5ad150"
},
"name": "admin"
}
}

View File

@ -0,0 +1,25 @@
{
"roles": [
{
"id": "5ad150",
"domain_id": "7cf37b",
"links": {
"self": "http://example.com/identity/v3/roles/5ad150"
},
"name": "admin"
},
{
"id": "a62eb6",
"domain_id": "7cf37b",
"links": {
"self": "http://example.com/identity/v3/roles/a62eb6"
},
"name": "Member"
}
],
"links": {
"next": null,
"previous": null,
"self": "http://example.com/identity/v3/users/ce9e07/OS-OAUTH1/access_tokens/6be26a/roles"
}
}