From c920d08b69fe64bbcddf562225ddf6e7a004c8ff Mon Sep 17 00:00:00 2001 From: agilob Date: Fri, 19 Mar 2021 13:11:22 +0000 Subject: [PATCH] [dart] mark json_serializable as experimental (#8979) * Hide json_serializable from public users * Make json_serializable as experimental * Update wording marking json_serializable as experimental --- docs/generators/dart.md | 2 +- .../org/openapitools/codegen/languages/DartClientCodegen.java | 2 +- pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/generators/dart.md b/docs/generators/dart.md index fb835a98ee0..24eecca602c 100644 --- a/docs/generators/dart.md +++ b/docs/generators/dart.md @@ -19,7 +19,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |pubLibrary|Library name in generated code| |null| |pubName|Name in generated pubspec| |null| |pubVersion|Version in generated pubspec| |null| -|serializationLibrary|Specify serialization library|
**native_serialization**
Use native serializer, backwards compatible
**json_serializable**
Use json_serializable
|native_serialization| +|serializationLibrary|Specify serialization library|
**native_serialization**
Use native serializer, backwards compatible
**json_serializable**
Use json_serializable. Experimental and subject to breaking changes without further notice
|native_serialization| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| |sourceFolder|Source folder for generated code| |null| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java index 2c84f7f747b..94bf7ac7a20 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java @@ -58,7 +58,7 @@ public class DartClientCodegen extends AbstractDartCodegen { final Map serializationOptions = new HashMap<>(); serializationOptions.put(SERIALIZATION_LIBRARY_NATIVE, "Use native serializer, backwards compatible"); - serializationOptions.put(SERIALIZATION_LIBRARY_JSON_SERIALIZABLE, "Use json_serializable"); + serializationOptions.put(SERIALIZATION_LIBRARY_JSON_SERIALIZABLE, "Use json_serializable. Experimental and subject to breaking changes without further notice"); serializationLibrary.setEnum(serializationOptions); cliOptions.add(serializationLibrary); } diff --git a/pom.xml b/pom.xml index 5095d1665f4..62231544063 100644 --- a/pom.xml +++ b/pom.xml @@ -1356,7 +1356,7 @@ samples/client/petstore/dart2/petstore samples/openapi3/client/petstore/dart2/petstore_client_lib samples/openapi3/client/petstore/dart2/petstore - samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake + samples/client/petstore/dart-dio/petstore_client_lib samples/openapi3/client/petstore/dart-dio/petstore_client_lib samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake