Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client context params can't be configured #1362

Open
alexvanloon opened this issue Aug 7, 2024 · 1 comment
Open

Client context params can't be configured #1362

alexvanloon opened this issue Aug 7, 2024 · 1 comment

Comments

@alexvanloon
Copy link

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant