<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.openfilz</groupId>
        <artifactId>openfilz-core</artifactId>
        <version>1.2.2</version>
    </parent>

    <artifactId>openfilz-sdk</artifactId>
    <packaging>pom</packaging>
    <name>OpenFilz SDK</name>
    <description>Multi-language SDK generation for OpenFilz REST and GraphQL APIs</description>

    <modules>
        <module>openfilz-sdk-java</module>
        <module>openfilz-sdk-java-reactive</module>
        <module>openfilz-sdk-typescript</module>
        <module>openfilz-sdk-python</module>
        <module>openfilz-sdk-csharp</module>
        <module>openfilz-sdk-samples-test</module>
    </modules>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.3.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>3.8.1</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <!-- Normalize the OpenAPI spec path to a valid file URI (fixes Windows backslash issue with swagger-parser) -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>3.6.0</version>
                <executions>
                    <execution>
                        <id>normalize-openapi-spec-uri</id>
                        <phase>initialize</phase>
                        <goals>
                            <goal>regex-property</goal>
                        </goals>
                        <configuration>
                            <name>openapi.spec.uri</name>
                            <value>file:///${project.build.directory}/openapi/openfilz-api.json</value>
                            <regex>\\</regex>
                            <replacement>/</replacement>
                            <failIfNoMatch>false</failIfNoMatch>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
