notonthehighstreet / svelte

Dynamic Ruby API Client from Swagger JSON Spec
MIT License
48 stars 17 forks source link

add support for specifying Faraday Middleware #4

Closed markburns closed 7 years ago

markburns commented 8 years ago

@bernat might be the best for reviewing this.

I'm not completely happy with this approach as it feels like I had to touch too many places, but functionality-wise it serves the purpose.

This allows us to do

middleware_stack = [[Faraday::HttpCache, {cache: Rails.cache}]]

Svelte.create(json: json, module_name: module_name, 
  options: {middleware_stack: middleware_stack}
)
markburns commented 7 years ago

Hey all. Just going through and tidying up my old PRs. I'm guessing you haven't needed this so going to close.