Advertisement
Guest User

Untitled

a guest
Mar 14th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.67 KB | None | 0 0
  1. openapi: 3.0.2
  2. info:
  3. title: Swagger hmnpf
  4. description: Сваггер для пенсионного фонда
  5. version: 1.0.0
  6. servers:
  7. - url: https://gl.hmnpf.ru:8181/api
  8. tags:
  9. - name: Account
  10. description: Контроллер для работы с аккаунтами
  11. externalDocs:
  12. description: Описание апи
  13. url: https://gl.hmnpf.ru:8181/Help/
  14.  
  15. paths:
  16. /Account/Register:
  17. post:
  18. tags:
  19. - Account
  20. requestBody:
  21. required: true
  22. content:
  23. application/json:
  24. schema:
  25. $ref: '#/components/schemas/RegisterBindingModel'
  26. responses:
  27. 200:
  28. description: Registation success
  29.  
  30. default:
  31. description: "Error"
  32. content:
  33. application/json:
  34. schema:
  35. $ref: '#/components/schemas/Error'
  36. /Account/Token:
  37. post:
  38. tags:
  39. - Account
  40. requestBody:
  41. required: true
  42. content:
  43. application/x-www-form-urlencoded:
  44. schema:
  45. $ref: '#/components/schemas/TokenForm'
  46. responses:
  47. 200:
  48. description: Auth success
  49. content:
  50. application/json:
  51. schema:
  52. $ref: '#/components/schemas/AuthToken'
  53. default:
  54. description: "Error"
  55. content:
  56. application/json:
  57. schema:
  58. $ref: '#/components/schemas/Error'
  59. /Account/UserProfile:
  60. get:
  61.  
  62. security:
  63. - bearerAuth: []
  64. tags:
  65. - Account
  66. responses:
  67. 200:
  68. description: Возвращает профайл пользователя
  69. content:
  70. application/json:
  71. schema:
  72. $ref: '#/components/schemas/GetUserProfile'
  73. default:
  74. description: Ошибка
  75. content:
  76. application/json:
  77. schema:
  78. $ref: '#/components/schemas/Error'
  79.  
  80. components:
  81. securitySchemes:
  82. bearerAuth:
  83. type: apiKey
  84. name: bearer
  85. in: header
  86. schemas:
  87. GetUserProfile:
  88. properties:
  89. FIO:
  90. type: string
  91. BirthDate:
  92. type: string
  93. Passport:
  94. type: string
  95. Phone:
  96. type: string
  97. Email:
  98. type: string
  99.  
  100. AuthToken:
  101. properties:
  102. access_token:
  103. type: string
  104. token_type:
  105. type: string
  106. expires_in:
  107. type: integer
  108. refresh_token:
  109. type: string
  110. client_id:
  111. type: string
  112. userName:
  113. type: string
  114. .issued:
  115. type: string
  116. .expires:
  117. type: string
  118.  
  119. RegisterBindingModel:
  120. required:
  121. - Email
  122. - Password
  123. properties:
  124. Email:
  125. type: string
  126. Password:
  127. type: string
  128. ConfirmPassword:
  129. type: string
  130.  
  131. TokenForm:
  132. properties:
  133. grant_type:
  134. type: string
  135. client_id:
  136. type: string
  137. client_secret:
  138. type: string
  139. username:
  140. type: string
  141. password:
  142. type: string
  143. Error:
  144. properties:
  145. error:
  146. type: string
  147. error_description:
  148. type: string
  149. Message:
  150. type: string
  151. ModelState:
  152. $ref: '#/components/schemas/ErrorModel'
  153. ErrorModel:
  154. properties:
  155. model:
  156. type: array
  157. items:
  158. type: string
  159. model.Email:
  160. type: array
  161. items:
  162. type: string
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement