sveltekit-api
sveltekit-api copied to clipboard
Optional path parameter like `[[id]]` is not working
trafficstars
If an api route like /api/users/[[id]] is created, this [[id]] string will become {[id}] and it does not work in swagger.
sveltekit error
SvelteKitError: Not found: /api/mapstyle/images/%7B[id%7D]
- Sveltekit optional path param endpoint https://svelte.dev/docs/kit/advanced-routing#Optional-parameters
Alternatively, I can create two +server.ts for /api/users and /api/users/{id}, but It would be nice if this package can support optional path param.