Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dependencies: update openapi-generator-cli #1609

Merged
merged 2 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions odd-platform-ui/generate.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

GENERATOR_IMAGE="openapitools/openapi-generator-cli:v5.1.1"
GENERATOR_IMAGE="openapitools/openapi-generator-cli:v7.2.0"
CONFIG_PATH="odd-platform-ui/openapi-config.yaml"
WORKDIR="//mnt" # Using double-slash for compatibility with Windows
HOST_DIRECTORY=/$(pwd)/..

docker run -v $HOST_DIRECTORY:$WORKDIR -w $WORKDIR --rm $GENERATOR_IMAGE generate -c $CONFIG_PATH
docker run -v "$HOST_DIRECTORY:$WORKDIR" -w "$WORKDIR" --rm "$GENERATOR_IMAGE" generate -c "$CONFIG_PATH"
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ const MetadataValueEditField: React.FC<MetadataValueEditFieldProps> = ({
const defaultText =
metadataType === MetadataFieldType.ARRAY ? 'item1,item2,...' : 'Value';

const inputTypes: MetadataFieldType[] = [
MetadataFieldType.INTEGER,
MetadataFieldType.FLOAT,
];

if (metadataType === MetadataFieldType.DATETIME) {
return (
<Controller
Expand Down Expand Up @@ -112,12 +117,7 @@ const MetadataValueEditField: React.FC<MetadataValueEditFieldProps> = ({
variant='main-m'
label={labeled ? t('Value') : undefined}
placeholder={labeled ? '' : defaultText}
type={
metadataType &&
[MetadataFieldType.INTEGER, MetadataFieldType.FLOAT].includes(metadataType)
? 'number'
: 'text'
}
type={metadataType && inputTypes.includes(metadataType) ? 'number' : 'text'}
Comment on lines -115 to +120
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

type resolving.
[MetadataFieldType.INTEGER, MetadataFieldType.FLOAT] will be ("INTEGER" | "FLOAT")[] type but we need MetadataFieldType[]

step={metadataType === MetadataFieldType.FLOAT ? 'any' : '1'}
/>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ type MainColNames = 'nm' | 'nd' | 'ow' | 'gr' | 'cr' | 'up' | 'st';
type AddColNames = 'us' | 'rc' | 'sr' | 'tr' | 'en' | 'su' | 'ne';

export type SearchTabsNames =
| DataEntityClassNameEnum.SET
| DataEntityClassNameEnum.CONSUMER
| DataEntityClassNameEnum.TRANSFORMER
| DataEntityClassNameEnum.INPUT
| DataEntityClassNameEnum.ENTITY_GROUP
| DataEntityClassNameEnum.QUALITY_TEST
Comment on lines -33 to -38
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this used to be enum. Now with the upgraded version, openapi generates const

| typeof DataEntityClassNameEnum.SET
| typeof DataEntityClassNameEnum.CONSUMER
| typeof DataEntityClassNameEnum.TRANSFORMER
| typeof DataEntityClassNameEnum.INPUT
| typeof DataEntityClassNameEnum.ENTITY_GROUP
| typeof DataEntityClassNameEnum.QUALITY_TEST
| 'all'
| 'my';
export type ColGridSizes = Record<MainColNames, GridSize> &
Expand Down