Skip to content
New issue

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

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

Already on GitHub? # to your account

[REQ] [RUBY] [FARADAY] Allow middleware to be configured #4476

Closed
johngallagher opened this issue Nov 13, 2019 · 1 comment
Closed

[REQ] [RUBY] [FARADAY] Allow middleware to be configured #4476

johngallagher opened this issue Nov 13, 2019 · 1 comment

Comments

@johngallagher
Copy link
Contributor

Is your feature request related to a problem? Please describe.

I want to instrument all API calls from Open API so I can measure performance.

Describe the solution you'd like

  • When the generator is using Ruby with the Faraday library, I'd like the generated code to allow configuration of middleware
  • It could be as simple as config.use_middlewares: [:instrumentation]
  • Then I could plug in the instrumentation middleware and Faraday does the rest
  • This would allow any middleware to be used and maximise the power of Faraday

Describe alternatives you've considered

  • Overriding the templates - this is messy and means that any changes in the templates will need to be merged into the instrumentation changes
  • Somehow inserting middleware before Faraday is initialized. This isn't currently possible
  • This solution is the most flexible - the config option would only be generated if using the Faraday library and would mean we get maximum flexibility
@ekohl
Copy link
Contributor

ekohl commented Aug 8, 2022

Shouldn't this be closed now that #10495 has been merged?

@wing328 wing328 closed this as completed Aug 8, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants