#JavaScript (ES6), 142 bytes
I thought this might have turned out shorter than it did.

    n=>(v=[...Array(n)].map(_=>`${t=" "[r="repeat"](n-x)}\\${s=" "[r](--x)}|${s}/`+t,x=n).join`
    `)+`
    ${h="-"[r](n)}O${h}
    `+[...v].reverse().join``

---
##Try It

<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-js -->

    f=
    n=>(v=[...Array(n)].map(_=>`${t=" "[r="repeat"](n-x)}\\${s=" "[r](--x)}|${s}/`+t,x=n).join`
    `)+`
    ${h="-"[r](n)}O${h}
    `+[...v].reverse().join``
    i.addEventListener("input",_=>o.innerText=f(+i.value))
    o.innerText=f(i.value=1)

<!-- language: lang-html -->

    <input id=i type=number><pre id=o>

<!-- end snippet -->