class OpenApiConnectorGenerator extends ConnectorGenerator {

    @Override
    public final APISummary info(final ConnectorTemplate connectorTemplate, final ConnectorSettings connectorSettings) {
        final OpenApiModelInfo modelInfo = parseSpecification(connectorSettings, APIValidationContext.CONSUMED_API);

        final OasDocument model = modelInfo.getModel();
        if (model == null) {
            final APISummary.Builder summaryBuilder = new APISummary.Builder()
                .errors(modelInfo.getErrors())
                .warnings(modelInfo.getWarnings());

            if (modelInfo.getResolvedSpecification() != null) {
                summaryBuilder.putConfiguredProperty(SPECIFICATION, modelInfo.getResolvedSpecification());
            }

            return summaryBuilder.build();
        }

        // No matter if the validation fails, try to process the swagger
        final Connector connector = basicConnector(connectorTemplate, connectorSettings);

        final OasPaths paths = model.paths;
        final AtomicInteger total = new AtomicInteger(0);
        final Map<String, Integer> tagCounts;
        if (paths == null) {
            tagCounts = Collections.emptyMap();
        } else {
            tagCounts = OasModelHelper.getPathItems(paths)
                .stream()
                .flatMap(p -> OasModelHelper.getOperationMap(p).values().stream())
                .peek(o -> total.incrementAndGet())
                .flatMap(o -> OasModelHelper.sanitizeTags(o.tags).distinct())
                .collect(
                    Collectors.groupingBy(
                        Function.identity(),
                        Collectors.reducing(0, (e) -> 1, Integer::sum)));
        }

        final ActionsSummary actionsSummary = new ActionsSummary.Builder()
            .totalActions(total.intValue())
            .actionCountByTags(tagCounts)
            .build();

        return APISummary.Builder.createFrom(connector)
            .actionsSummary(actionsSummary)
            .errors(modelInfo.getErrors())
            .warnings(modelInfo.getWarnings())
            .putAllConfiguredProperties(connectorSettings.getConfiguredProperties())
            .putConfiguredProperty(SPECIFICATION, modelInfo.getResolvedSpecification())
            .build();
    }

    public  OpenApiConnectorGenerator(final Connector baseConnector, final Supplier<String> operationIdGenerator);
    public  OpenApiConnectorGenerator(final Connector baseConnector);

}