petstore-missingversion.yaml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. info:
  2. version: 1.0.0
  3. title: Swagger Petstore
  4. license:
  5. name: MIT
  6. host: petstore.swagger.io
  7. basePath: /v1
  8. schemes:
  9. - http
  10. consumes:
  11. - application/json
  12. produces:
  13. - application/json
  14. paths:
  15. /pets:
  16. get:
  17. summary: List all pets
  18. operationId: listPets
  19. tags:
  20. - pets
  21. parameters:
  22. - name: limit
  23. in: query
  24. description: How many items to return at one time (max 100)
  25. required: false
  26. type: integer
  27. format: int32
  28. responses:
  29. "200":
  30. description: An paged array of pets
  31. headers:
  32. x-next:
  33. type: string
  34. description: A link to the next page of responses
  35. schema:
  36. $ref: '#/definitions/Pets'
  37. default:
  38. description: unexpected error
  39. schema:
  40. $ref: '#/definitions/Error'
  41. post:
  42. summary: Create a pet
  43. operationId: createPets
  44. tags:
  45. - pets
  46. responses:
  47. "201":
  48. description: Null response
  49. default:
  50. description: unexpected error
  51. schema:
  52. $ref: '#/definitions/Error'
  53. /pets/{petId}:
  54. get:
  55. summary: Info for a specific pet
  56. operationId: showPetById
  57. tags:
  58. - pets
  59. parameters:
  60. - name: petId
  61. in: path
  62. required: true
  63. description: The id of the pet to retrieve
  64. type: string
  65. responses:
  66. "200":
  67. description: Expected response to a valid request
  68. schema:
  69. $ref: '#/definitions/Pets'
  70. default:
  71. description: unexpected error
  72. schema:
  73. $ref: '#/definitions/Error'
  74. definitions:
  75. Pet:
  76. required:
  77. - id
  78. - name
  79. properties:
  80. id:
  81. type: integer
  82. format: int64
  83. name:
  84. type: string
  85. tag:
  86. type: string
  87. Pets:
  88. type: array
  89. items:
  90. $ref: '#/definitions/Pet'
  91. Error:
  92. required:
  93. - code
  94. - message
  95. properties:
  96. code:
  97. type: integer
  98. format: int32
  99. message:
  100. type: string