Skip to content

Commit

Permalink
feat: add boolean feature type (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
alarv authored Dec 4, 2024
1 parent 5e84989 commit f27947e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/kotlin/org/jaqpot/api/entity/FeatureType.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package org.jaqpot.api.entity

enum class FeatureType {
INTEGER, FLOAT, CATEGORICAL, STRING, TEXT, SMILES, FLOAT_ARRAY, STRING_ARRAY
INTEGER, FLOAT, CATEGORICAL, STRING, TEXT, SMILES, FLOAT_ARRAY, STRING_ARRAY, BOOLEAN
}
2 changes: 2 additions & 0 deletions src/main/kotlin/org/jaqpot/api/mapper/FeatureTypeMapper.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ fun FeatureTypeDto.toEntity(): FeatureType {
FeatureTypeDto.SMILES -> FeatureType.SMILES
FeatureTypeDto.FLOAT_ARRAY -> FeatureType.FLOAT_ARRAY
FeatureTypeDto.STRING_ARRAY -> FeatureType.STRING_ARRAY
FeatureTypeDto.BOOLEAN -> FeatureType.BOOLEAN
}
}

Expand All @@ -26,6 +27,7 @@ fun FeatureType.toDto(): FeatureTypeDto {
FeatureType.SMILES -> FeatureTypeDto.SMILES
FeatureType.FLOAT_ARRAY -> FeatureTypeDto.FLOAT_ARRAY
FeatureType.STRING_ARRAY -> FeatureTypeDto.STRING_ARRAY
FeatureType.BOOLEAN -> FeatureTypeDto.BOOLEAN
}
}

1 change: 1 addition & 0 deletions src/main/resources/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2097,6 +2097,7 @@ components:
- SMILES
- STRING
- TEXT
- BOOLEAN
- FLOAT_ARRAY
- STRING_ARRAY
example: FLOAT
Expand Down

0 comments on commit f27947e

Please sign in to comment.