Replies: 3 comments 3 replies
-
p.s. in the example provided above, as is, what would be the path to get to my route? 😕 |
Beta Was this translation helpful? Give feedback.
-
Looks like #152 - the Router part makes it, well, not work. If your smithy specs already contain a version prefix, you don't need to put a Router on top of them. |
Beta Was this translation helpful? Give feedback.
-
To counter balance your point smithy-lang/smithy#2233 (comment) this is what smithy-lang folks had to say:
|
Beta Was this translation helpful? Give feedback.
-
So with http4s I can do:
and that should make the route available at
/v1/hello/$name
. I'm trying to do this with a smithy4s generated route and I am not having much luck. This is my code:I can navigate to the swagger docs successfully via: http://localhost:9000/2.0/docs/ but:
http://localhost:9000/2.0
rather thanhttp://localhost:9000
. so the requests fail.Not sure if this is me not understanding http4s properly or if these are bugs by smithy4s.
the actual use case I have is this:
I have described it here: smithy-lang/smithy#2233 now on reflection, perhaps this api prefix should be kept off the api specs and not included in the smithy specs and the issue linked above isn't the way to do it, but I'd like to know how to have my service that is generated via prefix-free smithy specs, mounted with a prefix.
For now, I have resorted to hardcoding the version prefixes in the smithy definitions themselves but I feel like there must be a better way!
Beta Was this translation helpful? Give feedback.
All reactions