How did I solve «Undefined array key 2 in vendor/magento/framework/Reflection/TypeProcessor.php on line 947» on `/soap/default?services=storeStoreRepositoryV1`?

The call stack

1. Magento\Webapi\Model\Config\ClassReflector::extractMethodData()

2. Magento\Framework\Reflection\TypeProcessor::getParamDescription()

3. Magento\Framework\Reflection\TypeProcessor::getParamDocBlockTag()

Magento\Framework\Reflection\TypeProcessor::getParamDocBlockTag() incorrectly assumes that every parameter of a Web API exposed method has a @param comment in PHPDoc

3 ways to solve the problem

1. The best way

Write a plugin to the nearest public method: Magento\Framework\Reflection\TypeProcessor::getParamDescription()

2.

Patch the problem Magento\Framework\Reflection\TypeProcessor::getParamDocBlockTag() method by adding an isset() check to the problem line:

So replace it with:

return isset($paramsTag[$param->getPosition()]) ? $paramsTag[$param->getPosition()] : '';

3.

Add a @param PHPDoc comment to every Web API exposed method.