How to create path for taxonomy term pages with parent terms if they exist I have a taxonomy vocabulary which will only ever contain 2 level deep hierarchy.

I need the url to be just [vocabulary]/[term] for any parent term.

But for a child term I need it to be the following

[vocabulary]/[parent_term]/[term]

Is this possible with a pathauto token? If not, is there another solution to this?
You can use pathauto token like this.

 [term:vocabulary]/[term:parents:join-path]/[term:name]