[LiskHQ/lisk] Move swagger.definitions from onBind to library (#1487)

@LucasIsasmendi I don’t see any clear benefits of introducing the changes proposed, the good practice in that example is arguable.