diff --git a/chat-client-python/chat_client.py b/chat-client-python/chat_client.py index f15fe26..16bab0e 100755 --- a/chat-client-python/chat_client.py +++ b/chat-client-python/chat_client.py @@ -3,6 +3,10 @@ from importlib import metadata from packaging import version +if version.parse(metadata.version('pydantic')) < version.parse("2.0"): + print("pydantic 2+ required") + exit(1) + from chat_openapi.exceptions import ApiException from chat_openapi.configuration import Configuration from chat_openapi.api_client import ApiClient @@ -11,9 +15,6 @@ from chat_openapi.models.new_chat_message_request import NewChatMessageRequest from chat_openapi.models.background_color_enum import BackgroundColorEnum -if version.parse(metadata.version('pydantic')) < version.parse("2.0"): - print("pydantic 2+ required") - exit(1) configuration = Configuration(host="http://localhost:8080") configuration.debug = False diff --git a/chat-client-python/generate.sh b/chat-client-python/generate.sh index 96b23b5..e2d3e76 100755 --- a/chat-client-python/generate.sh +++ b/chat-client-python/generate.sh @@ -1,6 +1,6 @@ #!/bin/bash -GENERATOR_VERSION=7.4.0 +GENERATOR_VERSION=7.8.0 if [ ! -f "openapi-generator-cli-$GENERATOR_VERSION.jar" ] ; then wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/$GENERATOR_VERSION/openapi-generator-cli-$GENERATOR_VERSION.jar fi