-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Update pydantic to v2 #496
Labels
Comments
We need to rewrite diff --git generator/src/main/java/line/bot/generator/PythonNextgenCustomClientGenerator.java generator/src/main/java/line/bot/generator/PythonNextgenCustomClientGenerator.java
index 7d84030..e0e57f1 100644
--- generator/src/main/java/line/bot/generator/PythonNextgenCustomClientGenerator.java
+++ generator/src/main/java/line/bot/generator/PythonNextgenCustomClientGenerator.java
@@ -443,10 +443,10 @@ public class PythonNextgenCustomClientGenerator extends AbstractPythonCodegen im
if (cp.isArray) {
String constraints = "";
if (cp.maxItems != null) {
- constraints += String.format(Locale.ROOT, ", max_items=%d", cp.maxItems);
+ constraints += String.format(Locale.ROOT, ", max_length=%d", cp.maxItems);
}
if (cp.minItems != null) {
- constraints += String.format(Locale.ROOT, ", min_items=%d", cp.minItems);
+ constraints += String.format(Locale.ROOT, ", min_length=%d", cp.minItems);
}
if (cp.getUniqueItems()) {
constraints += ", unique_items=True";
@@ -723,10 +723,10 @@ public class PythonNextgenCustomClientGenerator extends AbstractPythonCodegen im
if (cp.isArray) {
String constraints = "";
if (cp.maxItems != null) {
- constraints += String.format(Locale.ROOT, ", max_items=%d", cp.maxItems);
+ constraints += String.format(Locale.ROOT, ", max_length=%d", cp.maxItems);
}
if (cp.minItems != null) {
- constraints += String.format(Locale.ROOT, ", min_items=%d", cp.minItems);
+ constraints += String.format(Locale.ROOT, ", min_length=%d", cp.minItems);
}
if (cp.getUniqueItems()) {
constraints += ", unique_items=True"; |
BTW, there's a remaining error.
Why it's happened? |
https://docs.pydantic.dev/latest/migration/ |
tokuhirom
added a commit
to tokuhirom/line-bot-sdk-python
that referenced
this issue
Jul 25, 2023
tokuhirom
added a commit
that referenced
this issue
Jul 25, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
pydantic v2 is not backward compatible.
We need to upgrade it.
The text was updated successfully, but these errors were encountered: