smithy-lang / smithy-typescript

Smithy code generators for TypeScript. (in development)
Apache License 2.0
221 stars 81 forks source link

Client context params can't be configured #1362

Open alexvanloon opened 1 month ago

alexvanloon commented 1 month ago

Hi I'm trying out the codegen and I'm trying to use the @clientContextParams trait as described in: https://smithy.io/2.0/additional-specs/rules-engine/parameters.html however I don't see the parameters I create reflected anywhere in the generated code, for example I have a service:

@clientContextParams({
    blabla: {
        type: "string"
        documentation: "The blabla"
    }
})
service blablaservice{
 operations:  [getStuff]
}

@http(method: "POST", uri: "/{testinput}", code: 200)
operation getStuff{
  input = {
    @required
    @httplabel
    @contextparam("blabla")
    testinput
  }
}

However I don't see the value blabla anywhere in the generated client. Is there any way to set this? I would like the option to set global values that will be used througout the service

alexvanloon commented 1 month ago

I have the same with using the clientOptional trait, when I use this trait the fields stay required in the client