conjure-rust
conjure-rust copied to clipboard
Expose conjure tags as endpoint parameters
Tags were previously not exposed at the endpoint level. The only tags that were effective were 'server-request-context' and 'server-limit-request-size', both of which were interpreted by conjure-rust at codegen time.
Add a 'tags' function to Endpoint, which exposes the set of tags. This is similar to the java undertow generator.
Forgoes adding 'tags' to the client, unlike the java dialogue implementation. This is because the clients are used directly in rust, as opposed to being passed into a dialogue client generator.
Generate changelog in changelog/@unreleased
changelog/@unreleasedType (Select exactly one)
- [ ] Feature (Adding new functionality)
- [ ] Improvement (Improving existing functionality)
- [ ] Fix (Fixing an issue with existing functionality)
- [x] Break (Creating a new major version by breaking public APIs)
- [ ] Deprecation (Removing functionality in a non-breaking way)
- [ ] Migration (Automatically moving data/functionality to a new system)
Description
Check the box to generate changelog(s)
- [x] Generate changelog entry
Out of curiosity, what's the use case for doing this? My general preference up to now was to have the code generator parse out the tags and handle all of the special casing up front rather than deferring it to runtime.
@sfackler Use case here is to expose the 'no-response-compression' tag to the witchcraft layer. I could also just add a specific case handler to the code generator for witchcraft to pick up instead of exposing tags in general, since it's evident that there haven't really been that many tags.
Yeah I think the easiest thing for that is to just have conjure-codegen inject a Content-Encoding: identity header. Avoids needing to mess with both repos as well.
This PR has been automatically marked as stale because it has not been touched in the last 14 days. If you'd like to keep it open, please leave a comment or add the 'long-lived' label, otherwise it'll be closed in 7 days.