<?xml version="1.0" encoding="UTF-8"?>
<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>io.github.magistvan</groupId>
        <artifactId>match-predicting-ann-server-client</artifactId>
        <version>7.57</version>
    </parent>

    <artifactId>match-predicting-ann-server-public-api-python</artifactId>
    <name>Match Predicting ANN Server Public API Python</name>
    <description>Public API for the Match Predicting ANN Server to be used by Python in order to implement endpoints
    </description>

    <build>
        <plugins>
            <!-- Generating python code from swagger documentation -->
            <plugin>
                <groupId>org.openapitools</groupId>
                <artifactId>openapi-generator-maven-plugin</artifactId>
                <configuration>
                    <generatorName>python-flask</generatorName>
                    <generateApiTests>false</generateApiTests>
                    <generateModelTests>false</generateModelTests>
                    <packageName>match_predicting_ann_server_pub_api</packageName>
                    <gitUserId>magistvan</gitUserId>
                    <gitRepoId>match-predicting-ann-server-client</gitRepoId>
                    <templateDirectory>${project.basedir}/src/main/resources/openapi-templates</templateDirectory>
                    <configOptions>
                        <generateAliasAsModel>false</generateAliasAsModel>
                        <modelPackage>model</modelPackage>
                        <apiPackage>api</apiPackage>
                        <packageVersion>${project.version}</packageVersion>
                        <appName>${project.description}</appName>
                    </configOptions>
                </configuration>
                <executions>
                    <execution>
                        <configuration>
                            <inputSpec>${swagger.docs.output}/swagger.json</inputSpec>
                            <output>${project.basedir}</output>
                            <skipValidateSpec>true</skipValidateSpec>
                        </configuration>
                        <id>Generate Python code</id>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <phase>generate-resources</phase>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>