Effect CommunityEC
Effect Community7mo ago
9 replies
Matt Rossman

Support for Optional Path Parameters in `HttpApiEndpoint` and `HttpApiSchema`

Does HttpApiEndpoint and/or HttpApiSchema support optional path params (like express)?
I thought I might be able to do something like:
const fooParam = HttpApiSchema.param("foo", Schema.String.pipe(
  Schema.optionalWith({ default: () => "bar" })
))

but the types won't allow it.
Was this page helpful?