paperclip-rs / paperclip

WIP OpenAPI tooling for Rust.
Apache License 2.0
874 stars 116 forks source link

Future of actix plugin interface #78

Open Ploppz opened 5 years ago

Ploppz commented 5 years ago

Having to 'override' actix_web::web with paperclip::actix::web does not seem like a nice solution. I would guess it requires some maintenance to mirror all features of actix_web. Secondly, it is not modular, If you had two plugins that worked this way you could only use one.

I don't have a better idea right now, but I make this issue to raise the concern and maybe start a discussion.

wafflespeanut commented 5 years ago

Thanks! I'm always open to new ideas! :smile:

wigy-opensource-developer commented 3 years ago

Decorating the inspected concepts like App, Resource, Scope and ServiceConfig is hard, because actix_web implements most methods on structs directly instead of on traits. The way forward would be to factor out wrapped methods upstream in actix_web onto traits that have default, statically overridable implementation (so no dyn Traits, but impl Traits).