Advertisement
Guest User

Untitled

a guest
Jun 2nd, 2017
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.10 KB | None | 0 0
  1. {
  2. "basePath": "/api",
  3. "definitions": {
  4. "user": {
  5. "properties": {
  6. "user_id": {
  7. "description": "User ID.",
  8. "example": 55,
  9. "type": "integer"
  10. },
  11. "user_name_first": {
  12. "description": "User's first name",
  13. "example": "Jan ",
  14. "type": "string"
  15. },
  16. "user_name_last": {
  17. "description": "User's last name",
  18. "example": "Nowak",
  19. "type": "string"
  20. }
  21. },
  22. "type": "object"
  23. }
  24. },
  25. "host": "xxx.yy.z",
  26. "info": {
  27. "title": "API",
  28. "version": "0.2"
  29. },
  30. "parameters": {
  31. "userIdParam": {
  32. "description": "User id",
  33. "format": "int64",
  34. "in": "path",
  35. "name": "id",
  36. "required": "true",
  37. "type": "integer"
  38. }
  39. },
  40. "paths": {
  41. "/users/{id}": {
  42. "get": {
  43. "parameters": [
  44. {
  45. "$ref": "#/parameters/userIdParam"
  46. }
  47. ],
  48. "responses": {
  49. "200": {
  50. "description": "Single user details",
  51. "schema": {
  52. "properties": {
  53. "code": {
  54. "description": "Response code",
  55. "example": "200",
  56. "type": "string"
  57. },
  58. "data": {
  59. "$ref": "#/definitions/user"
  60. },
  61. "success": {
  62. "description": "Operation status",
  63. "example": true,
  64. "type": "boolean"
  65. },
  66. "type": {
  67. "description": "Action type",
  68. "example": "Users",
  69. "type": "string"
  70. }
  71. },
  72. "type": "object"
  73. }
  74. }
  75. },
  76. "summary": "Returns user data specified by user ID",
  77. "tags": [
  78. "users"
  79. ]
  80. }
  81. }
  82. },
  83. "schemes": [
  84. "https"
  85. ],
  86. "swagger": "2.0",
  87. "tags": [
  88. {
  89. "description": "Actions involving users",
  90. "name": "users"
  91. }
  92. ]
  93. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement