openapi: "3.0.3"
info:
  title: My API
  version: "1.0.0"
components:
  schemas:
    User:
      type: object
      required: [id, email]
      properties:
        id:
          type: integer
        email:
          type: string
          format: email
        role:
          type: string
          enum: [admin, user, moderator]
        address:
          $ref: '#/components/schemas/Address'
    Address:
      type: object
      required: [street, city]
      properties:
        street:
          type: string
        city:
          type: string
        zip:
          type: string
