openapi: 3.1.0
info:
  title: Repro
  version: 1.0.0

paths:
  /users/{user_id}:
    put:
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/AdminUserUpdateRequest"
      responses:
        "200":
          description: OK

components:
  schemas:
    AdminUserUpdateRequest:
      type: object
      properties:
        role:
          anyOf:
            - type: string
              enum:
                - user
                - superadmin
            - type: "null"
          title: Role
