The OpenApi 3 Spec does not require a basePath on top level in the definition so it might be empty. This of course means, that there is no / in the basePath and so it should be added before each generated route.
This can be reproduced by using the OpenAPI 3 petstore.yaml example.
Currently the Handlebars helper endsWith does not cover this scenario. It compares the basePath's length-1 (=-1) with a not found /(= -1) which then leads to the same behavior as if there was a / at the end of the basePath.
The OpenApi 3 Spec does not require a basePath on top level in the definition so it might be empty. This of course means, that there is no
/
in the basePath and so it should be added before each generated route. This can be reproduced by using the OpenAPI 3 petstore.yaml example.Currently the Handlebars helper
endsWith
does not cover this scenario. It compares the basePath's length-1 (=-1
) with a not found/
(=-1
) which then leads to the same behavior as if there was a/
at the end of the basePath.