Skip to content

Commit

Permalink
spline #1155 Generate TypeScript code for DataSourceActionType
Browse files Browse the repository at this point in the history
  • Loading branch information
wajda committed Sep 2, 2024
1 parent 16005ea commit 94b343d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
22 changes: 20 additions & 2 deletions arangodb-foxx-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,34 @@
<argument>${project.basedir}/target/generated-ts/api.model.ts</argument>
<argument>--trait-to-type</argument>
<argument>--option-to-nullable</argument>
<argument>--string-single-quotes</argument>
<argument>--indent-size</argument>
<argument>4</argument>

<!-- ================================================ -->
<!-- list of root entities to generate TS definitions -->
<!-- ================================================ -->

<!-- Persistence model -->
<argument>za.co.absa.spline.persistence.model.Progress</argument>
<argument>za.co.absa.spline.persistence.model.DataSource</argument>
<argument>za.co.absa.spline.persistence.model.DBVersion</argument>

<!-- Producer model -->
<argument>za.co.absa.spline.producer.service.model.ExecutionPlanPersistentModel</argument>

<!-- Consumer model -->
<argument>za.co.absa.spline.consumer.service.model.Frame</argument>
<argument>za.co.absa.spline.consumer.service.model.ExecutionPlanInfo</argument>
<argument>za.co.absa.spline.consumer.service.model.ExecutionEventInfo</argument>
<argument>za.co.absa.spline.consumer.service.model.Label</argument>
<argument>za.co.absa.spline.consumer.service.model.DataSourceActionType</argument>
</arguments>
</configuration>
<dependencies>
<dependency>
<groupId>com.github.wajda</groupId>
<artifactId>scala-ts_${scala.compat.version}</artifactId>
<version>0.4.1.9</version>
<version>0.4.1.10</version>
</dependency>
</dependencies>
</plugin>
Expand All @@ -94,6 +106,12 @@
</build>

<dependencies>
<dependency>
<groupId>za.co.absa.spline</groupId>
<artifactId>commons</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ object DataSourceActionType {
case object Write extends DataSourceActionType("write")


val values: Set[DataSourceActionType] = EnumerationMacros.sealedInstancesOf[DataSourceActionType]
val values: Seq[DataSourceActionType] = EnumerationMacros.sealedInstancesOf[DataSourceActionType].toSeq

def findValueOf(name: String): Option[DataSourceActionType] =
DataSourceActionType.values.find(_.name.equalsIgnoreCase(name))
Expand Down

0 comments on commit 94b343d

Please sign in to comment.