Advertisement
Guest User

Swagger Outcome

a guest
Jan 22nd, 2019
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.47 KB | None | 0 0
  1. info:
  2. version: v1
  3. description: Please note that this API is not an official Ceph REST API to be used by third-party applications. It's primary purpose is to serve the requirements of the Ceph Dashboard and is subject to change at any time. Use at your own risk.
  4. title: Ceph-Dashboard REST API
  5. paths:
  6. /second_endpoint:
  7. get:
  8. summary: This is a second dummy endpoint
  9. responses:
  10. '200':
  11. description: OK.
  12. content:
  13. application/json:
  14. schema:
  15. type: object
  16. properties:
  17. username:
  18. type: string
  19. description: Description of return value
  20. '400':
  21. description: Operation exception. Please check the response body for details.
  22. '401':
  23. description: Not the default message
  24. '500':
  25. description: Unexpected error. Please check the response body for the stack trace.
  26. parameters:
  27. - in: query
  28. name: filter
  29.  
  30. # Wrap 'schema' into 'content.<media-type>'
  31. content:
  32. application/json: # <---- media type indicates how to serialize / deserialize the parameter content
  33. schema:
  34. type: object
  35. properties:
  36. type:
  37. type: string
  38. color:
  39. type: string
  40. - description: '*No description available*'
  41. content:
  42. application/json:
  43. schema:
  44. type: object
  45. properties:
  46. username:
  47. type: string
  48. description: 'Description of username'
  49. password:
  50. type: string
  51. description: 'Description of password'
  52. name: user
  53. in: query
  54. tags:
  55. - MyController
  56. /first_endpoint:
  57. get:
  58. summary: This is a dummy endpoint
  59. responses:
  60. '200':
  61. description: OK
  62. '400':
  63. description: Operation exception. Please check the response body for details.
  64. '401':
  65. description: Unauthenticated access. Please login first.
  66. '404':
  67. description: Page not found
  68. '500':
  69. description: Unexpected error. Please check the response body for the stack trace.
  70. parameters:
  71. - description: A number of your choice
  72. schema:
  73. type: object
  74. name: my_num
  75. in: query
  76. - description: A dummy message
  77. schema:
  78. type: object
  79. name: my_string
  80. in: query
  81. tags:
  82. - MyController
  83. /third_endpoint:
  84. get:
  85. summary: No description available
  86. responses:
  87. '400':
  88. description: Operation exception. Please check the response body for details.
  89. '401':
  90. description: Not the default message
  91. '500':
  92. description: Unexpected error. Please check the response body for the stack trace.
  93. parameters: []
  94. tags:
  95. - MySecondController
  96. host: ''
  97. schemes:
  98. - https
  99. components:
  100. securitySchemes:
  101. jwt:
  102. scheme: bearer
  103. type: http
  104. bearerFormat: JWT
  105. tags:
  106. - name: MyController
  107. description: This is a dummy controller
  108. - name: MySecondController
  109. description: '*No description available*'
  110. basePath: /
  111. servers:
  112. - url: /
  113. openapi: 3.0.0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement