class Oas30DataShapeGeneratorHelper {

    static List<Oas30Parameter> getOperationParameters(Oas30Document openApiDoc, Oas30Operation operation) {
        final List<Oas30Parameter> operationParameters = getParameters(openApiDoc, operation);

        OasPathItem parent = ofNullable(operation.parent())
            .filter(OasPathItem.class::isInstance)
            .map(OasPathItem.class::cast)
            .orElse(null);
        final List<Oas30Parameter> pathParameters = getParameters(openApiDoc, parent);
        operationParameters.addAll(pathParameters);

        return operationParameters
                    .stream()
                    .distinct()
                    .collect(Collectors.toList());
    }

    private  Oas30DataShapeGeneratorHelper();

}