You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

145 lines
3.6 KiB

  1. {
  2. "apiVersion": "1.0.0",
  3. "swaggerVersion": "1.2",
  4. "basePath": "http://petstore.swagger.wordnik.com/api",
  5. "resourcePath": "/store",
  6. "produces": [
  7. "application/json"
  8. ],
  9. "apis": [
  10. {
  11. "path": "/store/order/{orderId}",
  12. "operations": [
  13. {
  14. "method": "GET",
  15. "summary": "Find purchase order by ID",
  16. "notes": "For valid response try integer IDs with value <= 5. Anything above 5 or nonintegers will generate API errors",
  17. "type": "Order",
  18. "nickname": "getOrderById",
  19. "authorizations": {},
  20. "parameters": [
  21. {
  22. "name": "orderId",
  23. "description": "ID of pet that needs to be fetched",
  24. "required": true,
  25. "type": "string",
  26. "paramType": "path"
  27. }
  28. ],
  29. "responseMessages": [
  30. {
  31. "code": 400,
  32. "message": "Invalid ID supplied"
  33. },
  34. {
  35. "code": 404,
  36. "message": "Order not found"
  37. }
  38. ]
  39. },
  40. {
  41. "method": "DELETE",
  42. "summary": "Delete purchase order by ID",
  43. "notes": "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors",
  44. "type": "void",
  45. "nickname": "deleteOrder",
  46. "authorizations": {
  47. "oauth2": [
  48. {
  49. "scope": "test:anything",
  50. "description": "anything"
  51. }
  52. ]
  53. },
  54. "parameters": [
  55. {
  56. "name": "orderId",
  57. "description": "ID of the order that needs to be deleted",
  58. "required": true,
  59. "type": "string",
  60. "paramType": "path"
  61. }
  62. ],
  63. "responseMessages": [
  64. {
  65. "code": 400,
  66. "message": "Invalid ID supplied"
  67. },
  68. {
  69. "code": 404,
  70. "message": "Order not found"
  71. }
  72. ]
  73. }
  74. ]
  75. },
  76. {
  77. "path": "/store/order",
  78. "operations": [
  79. {
  80. "method": "POST",
  81. "summary": "Place an order for a pet",
  82. "notes": "",
  83. "type": "void",
  84. "nickname": "placeOrder",
  85. "authorizations": {
  86. "oauth2": [
  87. {
  88. "scope": "test:anything",
  89. "description": "anything"
  90. }
  91. ]
  92. },
  93. "parameters": [
  94. {
  95. "name": "body",
  96. "description": "order placed for purchasing the pet",
  97. "required": true,
  98. "type": "Order",
  99. "paramType": "body"
  100. }
  101. ],
  102. "responseMessages": [
  103. {
  104. "code": 400,
  105. "message": "Invalid order"
  106. }
  107. ]
  108. }
  109. ]
  110. }
  111. ],
  112. "models": {
  113. "Order": {
  114. "id": "Order",
  115. "description": "an order in the system",
  116. "properties": {
  117. "id": {
  118. "type": "integer",
  119. "format": "int64"
  120. },
  121. "petId": {
  122. "type": "integer",
  123. "format": "int64"
  124. },
  125. "quantity": {
  126. "type": "integer",
  127. "format": "int32"
  128. },
  129. "status": {
  130. "type": "string",
  131. "description": "Order Status",
  132. "enum": [
  133. "placed",
  134. " approved",
  135. " delivered"
  136. ]
  137. },
  138. "shipDate": {
  139. "type": "string",
  140. "format": "date-time"
  141. }
  142. }
  143. }
  144. }
  145. }