Ýx¨R'\ús„ |×ζ`θ».∊
Try it online or verify all test cases.
Explanation:
# e.g. input=3
Ý # Push a list in the range [0, (implicit) input]
# STACK: [0,1,2,3]
x # Double each value (without popping)
# STACK: [0,1,2,3],[0,2,4,6]
¨ # Remove the last item
# STACK: [0,1,2,3],[0,2,4]
R # Reverse it
# STACK: [0,1,2,3],[4,2,0]
'\ '# Push string "\"
# STACK: [0,1,2,3],[4,2,0],"\"
ú # Pad it with leading spaces based on the integer-list
# STACK: [0,1,2,3],[" \"," \","\"]
s # Swap so the earlier list is at the top
# STACK: [" \"," \","\"],[0,1,2,3]
„ | # Push string " |"
# STACK: [" \"," \","\"],[0,1,2,3]," |"
× # Repeat it the integers amount of times
# STACK: [" \"," \","\"],[""," |"," | |"," | | |"]
ζ # Create pairs of the two lists, which uses a space as implicit filler
# since they're of unequal lengths
# STACK: [[" \",""],[" \"," |"],["\"," | |"],[" "," | | |"]]
` # Pop and push the pairs separated to the stack
# STACK: [" \",""],[" \"," |"],["\"," | |"],[" "," | | |"]
θ # Leave just the last/second item of the top pair
# STACK: [" \",""],[" \"," |"],["\"," | |"]," | | |"
» # Join the stack with newline delimiter, which will implicitly join
# lists by spaces first
# STACK: " \ \n \ |\n\ | |\n | | |"
.∊ # Vertically mirror with overlap
# STACK: " \ \n \ |\n\ | |\n | | |\n\ | |\n \ |\n \ "
# (which is output implicitly as result)