<?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>org.camunda.community</groupId>
    <artifactId>camunda-engine-rest-client-root</artifactId>
    <version>7.21.1</version>
  </parent>

  <artifactId>camunda-engine-rest-client-openapi-java</artifactId>

  <dependencies>

    <!-- @Nullable annotation -->
    <dependency>
      <groupId>com.google.code.findbugs</groupId>
      <artifactId>jsr305</artifactId>
    </dependency>


    <!-- HTTP client: apache client -->
    <dependency>
      <groupId>org.apache.httpcomponents.client5</groupId>
      <artifactId>httpclient5</artifactId>
    </dependency>

    <!-- JSON processing: jackson -->
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-core</artifactId>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-annotations</artifactId>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.jaxrs</groupId>
      <artifactId>jackson-jaxrs-json-provider</artifactId>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.datatype</groupId>
      <artifactId>jackson-datatype-jsr310</artifactId>
    </dependency>
    <dependency>
      <groupId>org.openapitools</groupId>
      <artifactId>jackson-databind-nullable</artifactId>
    </dependency>
    <dependency>
      <groupId>jakarta.annotation</groupId>
      <artifactId>jakarta.annotation-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <!-- test dependencies -->
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.openapitools</groupId>
        <artifactId>openapi-generator-maven-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>generate</goal>
            </goals>
            <configuration>
              <inputSpec>/openapi.json</inputSpec>
              <generatorName>java</generatorName>
              <configOptions>
                <packageName>org.camunda.community.rest.client</packageName>
                <apiPackage>org.camunda.community.rest.client.api</apiPackage>
                <invokerPackage>org.camunda.community.rest.client.invoker</invokerPackage>
                <modelPackage>org.camunda.community.rest.client.dto</modelPackage>
                <library>apache-httpclient</library>
                <dateLibrary>java8</dateLibrary>
                <testOutput>${project.build.directory}/generated-test-sources/openapi</testOutput>
              </configOptions>
            </configuration>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>org.camunda.bpm</groupId>
            <artifactId>camunda-engine-rest-openapi</artifactId>
            <version>${camunda.version}</version>
          </dependency>
        </dependencies>
      </plugin>
    </plugins>
  </build>
</project>
