openapi: "3.0.0"
info:
  title: Read Only Write Only Union Test API
  version: "1.0"
paths: {}
components:
  schemas:
    User:
      type: object
      required:
        - id
        - name
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
        metadata:
          oneOf:
            - type: string
            - type: integer
          writeOnly: true
