Skip to content
This repository has been archived by the owner on Aug 4, 2023. It is now read-only.

IoC Support. #340

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

IoC Support. #340

wants to merge 1 commit into from

Conversation

steve-gray
Copy link
Contributor

Basic IoC Support, including:

  • New swaggerRouter optional parameter ('injected') that is passed to controller constructors.
  • Ability for swaggerRouter controllers to return function(inj) from require() and have that processed.
  • Updated tests to reflect and cover these changes (Users controller now requires it in test suite)
  • Documentation updates reflecting all of the above.

@steve-gray
Copy link
Contributor Author

Are the issues on this one just related to me self-enforcing eslint's comma-dangle rule? If so, can you just chop the offending dangling commas on the merge? I've got to sleep, and this is the third time I've gone through BeyondCompare trying to get things to line up since collapsing commits is the work of the git-devil.

@whitlockjc
Copy link
Member

Let's discuss this in #337 first and merge if we decide it's necessary. My initial thoughts are that IoC is not part of the problem domain swagger-tools' middleware should be involved in, especially since swagger-router already provides a means to build your own router mapping.

that permits instances to be created with custom parameters. This
allows use of an IoC container with dynamically wired-up controllers.
@steve-gray
Copy link
Contributor Author

Dangling commas issue fixed, hopefully. Just looking to TravisCI to confirm, but nothing seems to have picked up the need to rebuild yet.

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

Successfully merging this pull request may close these issues.

2 participants