Skip to content

Commit

Permalink
updated python client
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-kuba committed Oct 4, 2024
1 parent 6a32c3e commit e4f9072
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions chat-client-python/chat_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion chat-client-python/generate.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit e4f9072

Please sign in to comment.