api.yml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. openapi: 3.0.3
  2. info:
  3. title: User Management API
  4. description: API to manage user accounts with screen names and passwords
  5. version: 1.0.0
  6. paths:
  7. /user:
  8. get:
  9. summary: Get all users
  10. description: Retrieve a list of all user accounts without passwords.
  11. responses:
  12. '200':
  13. description: Successful response containing a list of users without passwords.
  14. content:
  15. application/json:
  16. schema:
  17. type: array
  18. items:
  19. $ref: '#/components/schemas/User'
  20. post:
  21. summary: Create a new user
  22. description: Create a new user account with a screen name and password.
  23. requestBody:
  24. required: true
  25. content:
  26. application/json:
  27. schema:
  28. $ref: '#/components/schemas/User'
  29. responses:
  30. '201':
  31. description: User account created successfully.
  32. '400':
  33. description: Bad request. Invalid input data.
  34. components:
  35. schemas:
  36. User:
  37. type: object
  38. properties:
  39. screen_name:
  40. type: string
  41. description: The user's screen name.
  42. password:
  43. type: string
  44. description: The user's password.
  45. readOnly: true
  46. format: password