Advertisement
Guest User

Untitled

a guest
Sep 20th, 2019
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.23 KB | None | 0 0
  1. swagger: "2.0"
  2. info:
  3. description: "MkHost Application for REST API"
  4. version: "1.0.0"
  5. title: "API MKhost"
  6. termsOfService: "http://swagger.io/terms/"
  7. contact:
  8. email: "bojan@mkhost.com.mk"
  9. # license:
  10. # name: "Apache 2.0"
  11. # url: "http://www.apache.org/licenses/LICENSE-2.0.html"
  12. host: "fakturi.mk-host.mk"
  13. basePath: "/api"
  14. consumes:
  15. - application/json
  16. produces:
  17. - application/json
  18. tags:
  19. - name: "Security"
  20. description: "MKhost security invoices"
  21. # externalDocs:
  22. # description: "Find out more"
  23. # url: "http://swagger.io"
  24. # - name: "store"
  25. # description: "Access to Petstore orders"
  26. # - name: "user"
  27. # description: "Operations about user"
  28. # externalDocs:
  29. # description: "Find out more about our store"
  30. # url: "http://swagger.io"
  31. schemes:
  32. - "https"
  33. - "http"
  34. # paths:
  35. # 'security_fakturi:
  36. # post:
  37. # tags:
  38. # - "Security"
  39. # summary: "This part is for generate a token"
  40. # description: "MKhost security invoices"
  41. # operationId: "getToken"
  42. # consumes:
  43. # - "application/json"
  44. # produces:
  45. # - "application/json"
  46. # parameters:
  47. # - in: "body"
  48. # name: "Authorization"
  49. # description: "Put credentials that are needed for application authentication"
  50. # required: true
  51. # schema:
  52. # $ref: "#/definitions/Token_generate"
  53. # responses:
  54. # default:
  55. # description: "successful operation"
  56. # # responses:
  57.  
  58. # # 200:
  59. # # description: "Successful authentication"
  60. # # schema:
  61. # # $ref: "#/definitions/AuthentichationSuccessResponse"
  62.  
  63.  
  64.  
  65. # # 405:
  66. # # description: "Invalid input"
  67. # # security:
  68. # # - petstore_auth:
  69. # # - "write:pets"
  70. # # - "read:pets"
  71.  
  72. # securityDefinitions:
  73. # Bearer:
  74. # type: apiKey
  75. # name: Authorization
  76. # in: header
  77. # paths:
  78. # /:
  79. # get:
  80. # security:
  81. # - Bearer: []
  82. # responses:
  83. # '200':
  84. # description: 'Will send `Authenticated`'
  85. # '403':
  86. # description: 'You do not have necessary permissions for the resource'
  87. paths:
  88. /security_fakturi:
  89. post:
  90. tags:
  91. - "Security"
  92. summary: "This part is for generate a token"
  93. description: "Put credentials that are needed for application authentication"
  94. # operationId: "getToken"
  95. consumes:
  96. - "application/json"
  97.  
  98. produces:
  99.  
  100. - "application/json"
  101. parameters:
  102. - name: "Authorization"
  103. in: "header"
  104. type: "array"
  105. description: "Authentication token is required"
  106. required: true
  107. schema:
  108. $ref: "#/definitions/Token_generate"
  109. responses:
  110. 200:
  111. description: "Sucess"
  112. 401:
  113. description: "Failed authentication"
  114.  
  115. 500:
  116. description: "Internal server error"
  117. 405:
  118. description: "Invalid input"
  119. 403:
  120. description: Access token does not have the required scope
  121.  
  122. # 200: # Response
  123. # description: OK
  124. # content: # Response body
  125. # application/json: # One of media types
  126. # schema:
  127. # type: object
  128. # properties:
  129. # id:
  130. # type: integer
  131. # name:
  132. # type: string
  133. # fullTime:
  134. # type: boolean
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144. securityDefinitions:
  145. # Authorization:
  146. # type: "apiKey"
  147. # authorizationUrl: "http://fakturi.mk-host.mk/api/security_fakturi"
  148. # flow: "implicit"
  149. # scopes:
  150. # write:pets: "modify pets in your account"
  151. # read:pets: "read your pets"
  152. api_key:
  153. type: "apiKey"
  154. name: "Authorization"
  155. in: "header"
  156. definitions:
  157. Token_generate:
  158. type: "object"
  159. required:
  160. - "client_id"
  161. - "client_secret"
  162. properties:
  163. client_id:
  164. type: "string"
  165. # format: "string1"
  166. example: "string"
  167. client_secret:
  168. type: "string"
  169. example: "string"
  170. # photoUrls:
  171. # type: "array"
  172. # xml:
  173. # name: "photoUrl"
  174. # wrapped: true
  175. # items:
  176. # type: "string"
  177. # tags:
  178. # type: "array"
  179. # xml:
  180. # name: "tag"
  181. # wrapped: true
  182. # items:
  183. # $ref: "#/definitions/Tag"
  184. # status:
  185. # type: "string"
  186. # description: "pet status in the store"
  187. # enum:
  188. # - "available"
  189. # - "pending"
  190. # - "sold"
  191. xml:
  192. name: "token"
  193. AuthentichationSuccessResponse:
  194. type: "object"
  195. properties:
  196. code:
  197. type: "integer"
  198. format: "int32"
  199. message:
  200. type: "string"
  201. ApiResponse:
  202. type: "object"
  203. properties:
  204. code:
  205. type: "integer"
  206. format: "int32"
  207. type:
  208. type: "string"
  209. message:
  210. type: "string"
  211. externalDocs:
  212. description: "Find out more about Swagger"
  213. url: "http://swagger.io"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement