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.

getUserDesc.js 1.0KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. module.exports = {
  2. get: {
  3. tags: ["User"],
  4. description: "Get user by id",
  5. parameters: [
  6. {
  7. name: "id",
  8. in: "path",
  9. schema: {
  10. $ref: "#/components/schemas/id",
  11. },
  12. required: true,
  13. description: "A single user id",
  14. }
  15. ],
  16. responses: {
  17. 200: {
  18. description: "Success",
  19. content: {
  20. "application/json": {
  21. schema: {
  22. $ref: "#/components/schemas/User",
  23. }
  24. }
  25. }
  26. },
  27. 400: {
  28. description: "Bad request"
  29. },
  30. 404: {
  31. description: "User with specified id does not exist"
  32. },
  33. 500: {
  34. description: "Internal server error"
  35. }
  36. }
  37. }
  38. }