Olivier Mélois
Olivier Mélois
Hey @sbly. The guiding design principle of smithy4s is to avoid the tweak of the generated code at all cost for protocol-specific purposes. The reason is that we're keeping smithy4s...
Sure : there's two ways of handling this, depending on whether you're okay for the Auth header to pollute the generated interfaces or not. #### First approach The first way...
@scala-impala, we have written a little [guide](https://disneystreaming.github.io/smithy4s/docs/guides/extract-request-info/) to describe an approach we recommend for writing this kind of middleware. The guide describes monomorphic code, but we have a [note](https://disneystreaming.github.io/smithy4s/docs/guides/extract-request-info/#alternative-methods) at...
@alexcardell I think using [auth-trait](https://awslabs.github.io/smithy/2.0/spec/authentication-traits.html?highlight=auth#httpapikeyauth-trait) will result in the corresponding routes being marked as authenticated in the openapi output. I say "I think" because we're re-using a lot of code...
Closing this : endpoint-specific middlewares are now available and can be used to implement auth. See the documentation : https://disneystreaming.github.io/smithy4s/docs/guides/endpoint-middleware
Can you elaborate on what content-type you're talking about, that the code generator for that other team expects ? In particular, is it a "json" content-type, because the `simpleRestJson` protocol...
@LiiMooTBM this is not supported by the `simpleRestJson` protocol provided by smithy4s, is the only protocol currently supported by smithy4s, and is a protocol that literally only understand json payloads....
> @Baccata thank you for providing such valuable information! Will the codegen and and open api part of the project still work with the aws.protocols#restJson1 annotation? @daddykotex you're not quite...
@daddykotex, you are correct in that the `SimpleRestJson` will only work if the service is annotated with `smithy4s.api#simpleRestJson`, and the router you get out of it only respects the semantics...
@LiiMooTBM you can pull in the `smithy4s-aws-kernel` dependency, which contains the generated code for a few aws-namespaces.