Advertisement
Guest User

Untitled

a guest
Sep 18th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. {
  2. "openapi": "3.0.0",
  3. "info": {
  4. "version": "1.0.0",
  5. "title": "Swagger Petstore",
  6. "license": {
  7. "name": "MIT"
  8. }
  9. },
  10. "servers": [],
  11. "paths": {
  12. "/pets": {
  13. "post": {
  14. "summary": "Create a pet",
  15. "operationId": "createPets",
  16. "tags": [
  17. "pets"
  18. ],
  19. "requestBody": {
  20. "content": {
  21. "application/json": {
  22. "schema": {
  23. "$ref": "#/components/schemas/Pet"
  24. },
  25. "example": {
  26. "id": "worldsCutestDog",
  27. "name": "Simba"
  28. }
  29. }
  30. }
  31. },
  32. "responses": {
  33. "201": {
  34. "description": "Null response"
  35. },
  36. "default": {
  37. "description": "unexpected error",
  38. "content": {
  39. "application/json": {
  40. "schema": {
  41. "$ref": "#/components/schemas/Error"
  42. }
  43. }
  44. }
  45. }
  46. }
  47. }
  48. }
  49. },
  50. "components": {
  51. "schemas": {
  52. "Pet": {
  53. "type": "object",
  54. "required": [
  55. "id",
  56. "name"
  57. ],
  58. "properties": {
  59. "id": {
  60. "type": "integer",
  61. "format": "int64"
  62. },
  63. "name": {
  64. "type": "string"
  65. },
  66. "tag": {
  67. "type": "string"
  68. }
  69. }
  70. },
  71. "Error": {
  72. "type": "object",
  73. "required": [
  74. "code",
  75. "message"
  76. ],
  77. "properties": {
  78. "code": {
  79. "type": "integer",
  80. "format": "int32"
  81. },
  82. "message": {
  83. "type": "string"
  84. }
  85. }
  86. }
  87. }
  88. }
  89. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement