class GenerateConnectorInspectionsMojo extends AbstractMojo {

    private List<ConnectorAction> generateInspections(Connector connector) throws IOException, DependencyResolutionRequiredException, ClassNotFoundException {
        final List<ConnectorAction> actions = new ArrayList<>();

        for (ConnectorAction action : connector.getActions()) {
            Optional<DataShape> inputDataShape = action.getDescriptor().getInputDataShape();
            Optional<DataShape> outputDataShape = action.getDescriptor().getOutputDataShape();

            if (inputDataShape.isPresent()) {
                inputDataShape = Optional.of(generateInspections(connector, inputDataShape.get()));
            }
            if (outputDataShape.isPresent()) {
                outputDataShape = Optional.of(generateInspections(connector, outputDataShape.get()));
            }

            if (inputDataShape.isPresent() || outputDataShape.isPresent()) {
                ConnectorDescriptor descriptor = new ConnectorDescriptor.Builder()
                    .createFrom(action.getDescriptor())
                    .inputDataShape(inputDataShape)
                    .outputDataShape(outputDataShape)
                    .build();

                action = new ConnectorAction.Builder()
                    .createFrom(action)
                    .descriptor(descriptor)
                    .build();
            }

            actions.add(action);
        }

        return actions;
    }

    public  GenerateConnectorInspectionsMojo();

}