I developed a custom magento module and was trying to test it using the validate_m2_package tool as part of marketplace upload. I am little confused on folder structure for Magento module.
I developed the modules using the following 1. app/code/vendorname/modulename/etc/module.xml app/code/vendorname/modulename/composer.json app/code/vendorname/modulename/registration.php
It was working fine functional as required for my purpose. But when I am package it to zip file with vendorname folder as root and run it against the validation tool it throws error saying "composer.json" is unexpected place. But when i package module file as root and validate it passes through all validation. is the folder structure correct? if yes, is the validation script is having a bug. if no, am i suppose to package only module file for marketplace upload?