diff --git a/docs/generators/dart-dio-next.md b/docs/generators/dart-dio-next.md index d247192fd97c54f960d5ff7a90a155c8edced4a1..5603f5da3abbb2aeaa8fb58324456c993d6f5803 100644 --- a/docs/generators/dart-dio-next.md +++ b/docs/generators/dart-dio-next.md @@ -25,18 +25,18 @@ These options may be applied as additional-properties (cli) or configOptions (pl |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|<dl><dt>**false**</dt><dd>No changes to the enum's are made, this is the default option.</dd><dt>**true**</dt><dd>With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.</dd></dl>|false| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|pubAuthor|Author name in generated pubspec| |null| -|pubAuthorEmail|Email address of the author in generated pubspec| |null| -|pubDescription|Description in generated pubspec| |null| -|pubHomepage|Homepage in generated pubspec| |null| -|pubLibrary|Library name in generated code| |null| -|pubName|Name in generated pubspec| |null| -|pubVersion|Version in generated pubspec| |null| +|pubAuthor|Author name in generated pubspec| |Author| +|pubAuthorEmail|Email address of the author in generated pubspec| |author@homepage| +|pubDescription|Description in generated pubspec| |OpenAPI API client| +|pubHomepage|Homepage in generated pubspec| |homepage| +|pubLibrary|Library name in generated code| |openapi.api| +|pubName|Name in generated pubspec| |openapi| +|pubVersion|Version in generated pubspec| |1.0.0| |serializationLibrary|Specify serialization library|<dl><dt>**built_value**</dt><dd>[DEFAULT] built_value</dd></dl>|built_value| |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| -|useEnumExtension|Allow the 'x-enum-values' extension for enums| |null| +|sourceFolder|source folder for generated code| |src| +|useEnumExtension|Allow the 'x-enum-values' extension for enums| |false| ## IMPORT MAPPING diff --git a/docs/generators/dart-dio.md b/docs/generators/dart-dio.md deleted file mode 100644 index b94bed6bcc7320665daf35c1224c31bd3cede4c9..0000000000000000000000000000000000000000 --- a/docs/generators/dart-dio.md +++ /dev/null @@ -1,244 +0,0 @@ ---- -title: Documentation for the dart-dio Generator ---- - -## METADATA - -| Property | Value | Notes | -| -------- | ----- | ----- | -| generator name | dart-dio | pass this to the generate command after -g | -| generator stability | STABLE | | -| generator type | CLIENT | | -| generator language | Dart | | -| generator default templating engine | mustache | | -| helpTxt | Generates a Dart Dio client library. | | - -## CONFIG OPTIONS -These options may be applied as additional-properties (cli) or configOptions (plugins). Refer to [configuration docs](https://openapi-generator.tech/docs/configuration) for more details. - -| Option | Description | Values | Default | -| ------ | ----------- | ------ | ------- | -|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|dateLibrary|Option. Date library to use|<dl><dt>**core**</dt><dd>Dart core library (DateTime)</dd><dt>**timemachine**</dt><dd>Time Machine is date and time library for Flutter, Web, and Server with support for timezones, calendars, cultures, formatting and parsing.</dd></dl>|core| -|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.</dd></dl>|true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|<dl><dt>**false**</dt><dd>No changes to the enum's are made, this is the default option.</dd><dt>**true**</dt><dd>With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.</dd></dl>|false| -|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true| -|nullableFields|Make all fields nullable in the JSON payload| |null| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|pubAuthor|Author name in generated pubspec| |null| -|pubAuthorEmail|Email address of the author in generated pubspec| |null| -|pubDescription|Description in generated pubspec| |null| -|pubHomepage|Homepage in generated pubspec| |null| -|pubLibrary|Library name in generated code| |null| -|pubName|Name in generated pubspec| |null| -|pubVersion|Version in generated pubspec| |null| -|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| -|useEnumExtension|Allow the 'x-enum-values' extension for enums| |null| - -## IMPORT MAPPING - -| Type/Alias | Imports | -| ---------- | ------- | - - -## INSTANTIATION TYPES - -| Type/Alias | Instantiated By | -| ---------- | --------------- | - - -## LANGUAGE PRIMITIVES - -<ul class="column-ul"> -<li>String</li> -<li>bool</li> -<li>double</li> -<li>int</li> -<li>num</li> -</ul> - -## RESERVED WORDS - -<ul class="column-ul"> -<li>abstract</li> -<li>as</li> -<li>assert</li> -<li>async</li> -<li>await</li> -<li>break</li> -<li>case</li> -<li>catch</li> -<li>class</li> -<li>const</li> -<li>continue</li> -<li>covariant</li> -<li>default</li> -<li>deferred</li> -<li>do</li> -<li>dynamic</li> -<li>else</li> -<li>enum</li> -<li>export</li> -<li>extends</li> -<li>extension</li> -<li>external</li> -<li>factory</li> -<li>false</li> -<li>final</li> -<li>finally</li> -<li>for</li> -<li>function</li> -<li>get</li> -<li>hide</li> -<li>if</li> -<li>implements</li> -<li>import</li> -<li>in</li> -<li>inout</li> -<li>interface</li> -<li>is</li> -<li>late</li> -<li>library</li> -<li>mixin</li> -<li>native</li> -<li>new</li> -<li>null</li> -<li>of</li> -<li>on</li> -<li>operator</li> -<li>out</li> -<li>part</li> -<li>patch</li> -<li>required</li> -<li>rethrow</li> -<li>return</li> -<li>set</li> -<li>show</li> -<li>source</li> -<li>static</li> -<li>super</li> -<li>switch</li> -<li>sync</li> -<li>this</li> -<li>throw</li> -<li>true</li> -<li>try</li> -<li>typedef</li> -<li>var</li> -<li>void</li> -<li>while</li> -<li>with</li> -<li>yield</li> -</ul> - -## FEATURE SET - - -### Client Modification Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|BasePath|✓|ToolingExtension -|Authorizations|✓|ToolingExtension -|UserAgent|✓|ToolingExtension -|MockServer|✗|ToolingExtension - -### Data Type Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Custom|✗|OAS2,OAS3 -|Int32|✓|OAS2,OAS3 -|Int64|✓|OAS2,OAS3 -|Float|✓|OAS2,OAS3 -|Double|✓|OAS2,OAS3 -|Decimal|✓|ToolingExtension -|String|✓|OAS2,OAS3 -|Byte|✓|OAS2,OAS3 -|Binary|✓|OAS2,OAS3 -|Boolean|✓|OAS2,OAS3 -|Date|✓|OAS2,OAS3 -|DateTime|✓|OAS2,OAS3 -|Password|✓|OAS2,OAS3 -|File|✓|OAS2 -|Array|✓|OAS2,OAS3 -|Maps|✓|ToolingExtension -|CollectionFormat|✓|OAS2 -|CollectionFormatMulti|✓|OAS2 -|Enum|✓|OAS2,OAS3 -|ArrayOfEnum|✓|ToolingExtension -|ArrayOfModel|✓|ToolingExtension -|ArrayOfCollectionOfPrimitives|✓|ToolingExtension -|ArrayOfCollectionOfModel|✓|ToolingExtension -|ArrayOfCollectionOfEnum|✓|ToolingExtension -|MapOfEnum|✓|ToolingExtension -|MapOfModel|✓|ToolingExtension -|MapOfCollectionOfPrimitives|✓|ToolingExtension -|MapOfCollectionOfModel|✓|ToolingExtension -|MapOfCollectionOfEnum|✓|ToolingExtension - -### Documentation Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Readme|✓|ToolingExtension -|Model|✓|ToolingExtension -|Api|✓|ToolingExtension - -### Global Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Host|✓|OAS2,OAS3 -|BasePath|✓|OAS2,OAS3 -|Info|✓|OAS2,OAS3 -|Schemes|✗|OAS2,OAS3 -|PartialSchemes|✓|OAS2,OAS3 -|Consumes|✓|OAS2 -|Produces|✓|OAS2 -|ExternalDocumentation|✓|OAS2,OAS3 -|Examples|✓|OAS2,OAS3 -|XMLStructureDefinitions|✗|OAS2,OAS3 -|MultiServer|✗|OAS3 -|ParameterizedServer|✗|OAS3 -|ParameterStyling|✗|OAS3 -|Callbacks|✗|OAS3 -|LinkObjects|✗|OAS3 - -### Parameter Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Path|✓|OAS2,OAS3 -|Query|✓|OAS2,OAS3 -|Header|✓|OAS2,OAS3 -|Body|✓|OAS2 -|FormUnencoded|✓|OAS2 -|FormMultipart|✓|OAS2 -|Cookie|✓|OAS3 - -### Schema Support Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Simple|✓|OAS2,OAS3 -|Composite|✗|OAS2,OAS3 -|Polymorphism|✗|OAS2,OAS3 -|Union|✗|OAS3 - -### Security Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|BasicAuth|✓|OAS2,OAS3 -|ApiKey|✓|OAS2,OAS3 -|OpenIDConnect|✗|OAS3 -|BearerToken|✓|OAS3 -|OAuth2_Implicit|✓|OAS2,OAS3 -|OAuth2_Password|✗|OAS2,OAS3 -|OAuth2_ClientCredentials|✗|OAS2,OAS3 -|OAuth2_AuthorizationCode|✗|OAS2,OAS3 - -### Wire Format Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|JSON|✓|OAS2,OAS3 -|XML|✗|OAS2,OAS3 -|PROTOBUF|✗|ToolingExtension -|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/dart-jaguar.md b/docs/generators/dart-jaguar.md deleted file mode 100644 index 0f6aed48cbe3bfc7ee0d65ed709ef45f0b52b21a..0000000000000000000000000000000000000000 --- a/docs/generators/dart-jaguar.md +++ /dev/null @@ -1,244 +0,0 @@ ---- -title: Documentation for the dart-jaguar Generator ---- - -## METADATA - -| Property | Value | Notes | -| -------- | ----- | ----- | -| generator name | dart-jaguar | pass this to the generate command after -g | -| generator stability | DEPRECATED | | -| generator type | CLIENT | | -| generator language | Dart | | -| generator default templating engine | mustache | | -| helpTxt | Generates a Dart Jaguar client library. | | - -## CONFIG OPTIONS -These options may be applied as additional-properties (cli) or configOptions (plugins). Refer to [configuration docs](https://openapi-generator.tech/docs/configuration) for more details. - -| Option | Description | Values | Default | -| ------ | ----------- | ------ | ------- | -|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.</dd></dl>|true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|<dl><dt>**false**</dt><dd>No changes to the enum's are made, this is the default option.</dd><dt>**true**</dt><dd>With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.</dd></dl>|false| -|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true| -|nullableFields|Is the null fields should be in the JSON payload| |null| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|pubAuthor|Author name in generated pubspec| |null| -|pubAuthorEmail|Email address of the author in generated pubspec| |null| -|pubDescription|Description in generated pubspec| |null| -|pubHomepage|Homepage in generated pubspec| |null| -|pubLibrary|Library name in generated code| |null| -|pubName|Name in generated pubspec| |null| -|pubVersion|Version in generated pubspec| |null| -|serialization|Choose serialization format JSON or PROTO is supported| |null| -|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| -|useEnumExtension|Allow the 'x-enum-values' extension for enums| |null| - -## IMPORT MAPPING - -| Type/Alias | Imports | -| ---------- | ------- | - - -## INSTANTIATION TYPES - -| Type/Alias | Instantiated By | -| ---------- | --------------- | - - -## LANGUAGE PRIMITIVES - -<ul class="column-ul"> -<li>String</li> -<li>bool</li> -<li>double</li> -<li>int</li> -<li>num</li> -</ul> - -## RESERVED WORDS - -<ul class="column-ul"> -<li>abstract</li> -<li>as</li> -<li>assert</li> -<li>async</li> -<li>await</li> -<li>break</li> -<li>case</li> -<li>catch</li> -<li>class</li> -<li>const</li> -<li>continue</li> -<li>covariant</li> -<li>default</li> -<li>deferred</li> -<li>do</li> -<li>dynamic</li> -<li>else</li> -<li>enum</li> -<li>export</li> -<li>extends</li> -<li>extension</li> -<li>external</li> -<li>factory</li> -<li>false</li> -<li>final</li> -<li>finally</li> -<li>for</li> -<li>function</li> -<li>get</li> -<li>hide</li> -<li>if</li> -<li>implements</li> -<li>import</li> -<li>in</li> -<li>inout</li> -<li>interface</li> -<li>is</li> -<li>late</li> -<li>library</li> -<li>mixin</li> -<li>native</li> -<li>new</li> -<li>null</li> -<li>of</li> -<li>on</li> -<li>operator</li> -<li>out</li> -<li>part</li> -<li>patch</li> -<li>required</li> -<li>rethrow</li> -<li>return</li> -<li>set</li> -<li>show</li> -<li>source</li> -<li>static</li> -<li>super</li> -<li>switch</li> -<li>sync</li> -<li>this</li> -<li>throw</li> -<li>true</li> -<li>try</li> -<li>typedef</li> -<li>var</li> -<li>void</li> -<li>while</li> -<li>with</li> -<li>yield</li> -</ul> - -## FEATURE SET - - -### Client Modification Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|BasePath|✓|ToolingExtension -|Authorizations|✗|ToolingExtension -|UserAgent|✗|ToolingExtension -|MockServer|✗|ToolingExtension - -### Data Type Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Custom|✗|OAS2,OAS3 -|Int32|✓|OAS2,OAS3 -|Int64|✓|OAS2,OAS3 -|Float|✓|OAS2,OAS3 -|Double|✓|OAS2,OAS3 -|Decimal|✓|ToolingExtension -|String|✓|OAS2,OAS3 -|Byte|✓|OAS2,OAS3 -|Binary|✓|OAS2,OAS3 -|Boolean|✓|OAS2,OAS3 -|Date|✓|OAS2,OAS3 -|DateTime|✓|OAS2,OAS3 -|Password|✓|OAS2,OAS3 -|File|✓|OAS2 -|Array|✓|OAS2,OAS3 -|Maps|✓|ToolingExtension -|CollectionFormat|✓|OAS2 -|CollectionFormatMulti|✓|OAS2 -|Enum|✓|OAS2,OAS3 -|ArrayOfEnum|✓|ToolingExtension -|ArrayOfModel|✓|ToolingExtension -|ArrayOfCollectionOfPrimitives|✓|ToolingExtension -|ArrayOfCollectionOfModel|✓|ToolingExtension -|ArrayOfCollectionOfEnum|✓|ToolingExtension -|MapOfEnum|✓|ToolingExtension -|MapOfModel|✓|ToolingExtension -|MapOfCollectionOfPrimitives|✓|ToolingExtension -|MapOfCollectionOfModel|✓|ToolingExtension -|MapOfCollectionOfEnum|✓|ToolingExtension - -### Documentation Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Readme|✓|ToolingExtension -|Model|✓|ToolingExtension -|Api|✓|ToolingExtension - -### Global Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Host|✓|OAS2,OAS3 -|BasePath|✓|OAS2,OAS3 -|Info|✓|OAS2,OAS3 -|Schemes|✗|OAS2,OAS3 -|PartialSchemes|✓|OAS2,OAS3 -|Consumes|✓|OAS2 -|Produces|✓|OAS2 -|ExternalDocumentation|✓|OAS2,OAS3 -|Examples|✓|OAS2,OAS3 -|XMLStructureDefinitions|✗|OAS2,OAS3 -|MultiServer|✗|OAS3 -|ParameterizedServer|✗|OAS3 -|ParameterStyling|✗|OAS3 -|Callbacks|✗|OAS3 -|LinkObjects|✗|OAS3 - -### Parameter Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Path|✓|OAS2,OAS3 -|Query|✓|OAS2,OAS3 -|Header|✓|OAS2,OAS3 -|Body|✓|OAS2 -|FormUnencoded|✓|OAS2 -|FormMultipart|✓|OAS2 -|Cookie|✓|OAS3 - -### Schema Support Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Simple|✓|OAS2,OAS3 -|Composite|✗|OAS2,OAS3 -|Polymorphism|✗|OAS2,OAS3 -|Union|✗|OAS3 - -### Security Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|BasicAuth|✓|OAS2,OAS3 -|ApiKey|✓|OAS2,OAS3 -|OpenIDConnect|✗|OAS3 -|BearerToken|✗|OAS3 -|OAuth2_Implicit|✓|OAS2,OAS3 -|OAuth2_Password|✗|OAS2,OAS3 -|OAuth2_ClientCredentials|✗|OAS2,OAS3 -|OAuth2_AuthorizationCode|✗|OAS2,OAS3 - -### Wire Format Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|JSON|✓|OAS2,OAS3 -|XML|✗|OAS2,OAS3 -|PROTOBUF|✓|ToolingExtension -|Custom|✗|OAS2,OAS3 diff --git a/docs/generators/dart.md b/docs/generators/dart.md index 5c8c4ffac8b8ca8ec60b4f877e8a8ec3139ab7b7..f570ec18708abecb35b076ddbf21ba571060784f 100644 --- a/docs/generators/dart.md +++ b/docs/generators/dart.md @@ -24,18 +24,18 @@ These options may be applied as additional-properties (cli) or configOptions (pl |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|<dl><dt>**false**</dt><dd>No changes to the enum's are made, this is the default option.</dd><dt>**true**</dt><dd>With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.</dd></dl>|false| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|pubAuthor|Author name in generated pubspec| |null| -|pubAuthorEmail|Email address of the author in generated pubspec| |null| -|pubDescription|Description in generated pubspec| |null| -|pubHomepage|Homepage in generated pubspec| |null| -|pubLibrary|Library name in generated code| |null| -|pubName|Name in generated pubspec| |null| -|pubVersion|Version in generated pubspec| |null| +|pubAuthor|Author name in generated pubspec| |Author| +|pubAuthorEmail|Email address of the author in generated pubspec| |author@homepage| +|pubDescription|Description in generated pubspec| |OpenAPI API client| +|pubHomepage|Homepage in generated pubspec| |homepage| +|pubLibrary|Library name in generated code| |openapi.api| +|pubName|Name in generated pubspec| |openapi| +|pubVersion|Version in generated pubspec| |1.0.0| |serializationLibrary|Specify serialization library|<dl><dt>**native_serialization**</dt><dd>Use native serializer, backwards compatible</dd></dl>|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| -|useEnumExtension|Allow the 'x-enum-values' extension for enums| |null| +|sourceFolder|source folder for generated code| |src| +|useEnumExtension|Allow the 'x-enum-values' extension for enums| |false| ## IMPORT MAPPING diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractDartCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractDartCodegen.java index 8d121c79c732b69a06c7facc4173bb87835c35f5..2efb3790d760dae00ab463d5b7cc18a442879f60 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractDartCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractDartCodegen.java @@ -54,7 +54,8 @@ public abstract class AbstractDartCodegen extends DefaultCodegen { protected String pubAuthorEmail = "author@homepage"; protected String pubHomepage = "homepage"; protected boolean useEnumExtension = false; - protected String sourceFolder = ""; + protected String sourceFolder = "src"; + protected String libPath = "lib" + File.separator; protected String apiDocPath = "doc" + File.separator; protected String modelDocPath = "doc" + File.separator; protected String apiTestPath = "test" + File.separator; @@ -99,8 +100,8 @@ public abstract class AbstractDartCodegen extends DefaultCodegen { modelTemplateFiles.put("model.mustache", ".dart"); apiTemplateFiles.put("api.mustache", ".dart"); embeddedTemplateDir = templateDir = "dart2"; - apiPackage = "lib.api"; - modelPackage = "lib.model"; + apiPackage = "api"; + modelPackage = "model"; modelDocTemplateFiles.put("object_doc.mustache", ".md"); apiDocTemplateFiles.put("api_doc.mustache", ".md"); @@ -182,15 +183,15 @@ public abstract class AbstractDartCodegen extends DefaultCodegen { imports.put("Object", "dart:core"); imports.put("MultipartFile", "package:http/http.dart"); - cliOptions.add(new CliOption(PUB_LIBRARY, "Library name in generated code")); - cliOptions.add(new CliOption(PUB_NAME, "Name in generated pubspec")); - cliOptions.add(new CliOption(PUB_VERSION, "Version in generated pubspec")); - cliOptions.add(new CliOption(PUB_DESCRIPTION, "Description in generated pubspec")); - cliOptions.add(new CliOption(PUB_AUTHOR, "Author name in generated pubspec")); - cliOptions.add(new CliOption(PUB_AUTHOR_EMAIL, "Email address of the author in generated pubspec")); - cliOptions.add(new CliOption(PUB_HOMEPAGE, "Homepage in generated pubspec")); - cliOptions.add(new CliOption(USE_ENUM_EXTENSION, "Allow the 'x-enum-values' extension for enums")); - cliOptions.add(new CliOption(CodegenConstants.SOURCE_FOLDER, "Source folder for generated code")); + addOption(PUB_LIBRARY, "Library name in generated code", pubLibrary); + addOption(PUB_NAME, "Name in generated pubspec", pubName); + addOption(PUB_VERSION, "Version in generated pubspec", pubVersion); + addOption(PUB_DESCRIPTION, "Description in generated pubspec", pubDescription); + addOption(PUB_AUTHOR, "Author name in generated pubspec", pubAuthor); + addOption(PUB_AUTHOR_EMAIL, "Email address of the author in generated pubspec", pubAuthorEmail); + addOption(PUB_HOMEPAGE, "Homepage in generated pubspec", pubHomepage); + addOption(USE_ENUM_EXTENSION, "Allow the 'x-enum-values' extension for enums", String.valueOf(useEnumExtension)); + addOption(CodegenConstants.SOURCE_FOLDER, CodegenConstants.SOURCE_FOLDER_DESC, sourceFolder); } @Override @@ -212,6 +213,13 @@ public abstract class AbstractDartCodegen extends DefaultCodegen { public void processOpts() { super.processOpts(); + // Fix a couple Java notation properties + modelPackage = modelPackage.replace('.', '/'); + apiPackage = apiPackage.replace('.', '/'); + // And overwrite them in the additional properties + additionalProperties.put(CodegenConstants.MODEL_PACKAGE, modelPackage); + additionalProperties.put(CodegenConstants.API_PACKAGE, apiPackage); + if (StringUtils.isEmpty(System.getenv("DART_POST_PROCESS_FILE"))) { LOGGER.info("Environment variable DART_POST_PROCESS_FILE not defined so the Dart code may not be properly formatted. To define it, try `export DART_POST_PROCESS_FILE=\"/usr/local/bin/dartfmt -w\"` (Linux/Mac)"); LOGGER.info("NOTE: To enable file post-processing, 'enablePostProcessFile' must be set to `true` (--enable-post-process-file for CLI)."); @@ -274,8 +282,10 @@ public abstract class AbstractDartCodegen extends DefaultCodegen { } if (additionalProperties.containsKey(CodegenConstants.SOURCE_FOLDER)) { - this.setSourceFolder((String) additionalProperties.get(CodegenConstants.SOURCE_FOLDER)); + String srcFolder = (String) additionalProperties.get(CodegenConstants.SOURCE_FOLDER); + this.setSourceFolder(srcFolder.replace('/', File.separatorChar)); } + additionalProperties.put(CodegenConstants.SOURCE_FOLDER, sourceFolder); // make api and model doc path available in mustache template additionalProperties.put("apiDocPath", apiDocPath); @@ -307,32 +317,32 @@ public abstract class AbstractDartCodegen extends DefaultCodegen { @Override public String apiFileFolder() { - return outputFolder + File.separator + sourceFolder + File.separator + apiPackage().replace('.', File.separatorChar); + return (outputFolder + File.separator + libPath + sourceFolder + File.separator + apiPackage()).replace('/', File.separatorChar); } @Override public String modelFileFolder() { - return outputFolder + File.separator + sourceFolder + File.separator + modelPackage().replace('.', File.separatorChar); + return (outputFolder + File.separator + libPath + sourceFolder + File.separator + modelPackage()).replace('/', File.separatorChar); } @Override public String apiTestFileFolder() { - return outputFolder + File.separator + apiTestPath.replace('/', File.separatorChar); + return outputFolder + File.separator + apiTestPath; } @Override public String modelTestFileFolder() { - return outputFolder + File.separator + modelTestPath.replace('/', File.separatorChar); + return outputFolder + File.separator + modelTestPath; } @Override public String apiDocFileFolder() { - return outputFolder + File.separator + apiDocPath.replace('/', File.separatorChar); + return outputFolder + File.separator + apiDocPath; } @Override public String modelDocFileFolder() { - return outputFolder + File.separator + modelDocPath.replace('/', File.separatorChar); + return outputFolder + File.separator + modelDocPath; } @Override 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 5693d19265c9238d968c4bc29d9ffc4a6064c401..40edd69ed377e4011df399a4c102a324d89816ab 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 @@ -17,14 +17,12 @@ package org.openapitools.codegen.languages; -import com.google.common.collect.Sets; import org.openapitools.codegen.CliOption; import org.openapitools.codegen.CodegenConstants; import org.openapitools.codegen.SupportingFile; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.io.File; import java.util.HashMap; import java.util.Map; @@ -45,6 +43,8 @@ public class DartClientCodegen extends AbstractDartCodegen { serializationOptions.put(SERIALIZATION_LIBRARY_NATIVE, "Use native serializer, backwards compatible"); serializationLibrary.setEnum(serializationOptions); cliOptions.add(serializationLibrary); + + sourceFolder = ""; } @Override @@ -61,15 +61,14 @@ public class DartClientCodegen extends AbstractDartCodegen { this.setSerializationLibrary(); - final String libFolder = sourceFolder + File.separator + "lib"; supportingFiles.add(new SupportingFile("pubspec.mustache", "", "pubspec.yaml")); supportingFiles.add(new SupportingFile("analysis_options.mustache", "", "analysis_options.yaml")); - supportingFiles.add(new SupportingFile("api_client.mustache", libFolder, "api_client.dart")); - supportingFiles.add(new SupportingFile("api_exception.mustache", libFolder, "api_exception.dart")); - supportingFiles.add(new SupportingFile("api_helper.mustache", libFolder, "api_helper.dart")); - supportingFiles.add(new SupportingFile("apilib.mustache", libFolder, "api.dart")); + supportingFiles.add(new SupportingFile("api_client.mustache", libPath, "api_client.dart")); + supportingFiles.add(new SupportingFile("api_exception.mustache", libPath, "api_exception.dart")); + supportingFiles.add(new SupportingFile("api_helper.mustache", libPath, "api_helper.dart")); + supportingFiles.add(new SupportingFile("apilib.mustache", libPath, "api.dart")); - final String authFolder = sourceFolder + File.separator + "lib" + File.separator + "auth"; + final String authFolder = libPath + "auth"; supportingFiles.add(new SupportingFile("auth/authentication.mustache", authFolder, "authentication.dart")); supportingFiles.add(new SupportingFile("auth/http_basic_auth.mustache", authFolder, "http_basic_auth.dart")); supportingFiles.add(new SupportingFile("auth/http_bearer_auth.mustache", authFolder, "http_bearer_auth.dart")); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioNextClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioNextClientCodegen.java index bafbfb21188f952721d13c9f068cdea2f8a84363..b6eea21d1a8a8ef2950390afc0b077d25504529d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioNextClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioNextClientCodegen.java @@ -84,9 +84,6 @@ public class DartDioNextClientCodegen extends AbstractDartCodegen { embeddedTemplateDir = "dart/libraries/dio"; this.setTemplateDir(embeddedTemplateDir); - apiPackage = "lib.src.api"; - modelPackage = "lib.src.model"; - supportedLibraries.put(SERIALIZATION_LIBRARY_BUILT_VALUE, "[DEFAULT] built_value"); final CliOption serializationLibrary = CliOption.newString(CodegenConstants.SERIALIZATION_LIBRARY, "Specify serialization library"); serializationLibrary.setEnum(supportedLibraries); @@ -162,10 +159,9 @@ public class DartDioNextClientCodegen extends AbstractDartCodegen { supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore")); supportingFiles.add(new SupportingFile("README.mustache", "", "README.md")); - final String libFolder = sourceFolder + File.separator + "lib"; - supportingFiles.add(new SupportingFile("lib.mustache", libFolder, pubName + ".dart")); + supportingFiles.add(new SupportingFile("lib.mustache", libPath, pubName + ".dart")); - final String srcFolder = libFolder + File.separator + "src"; + final String srcFolder = libPath + sourceFolder; supportingFiles.add(new SupportingFile("api_client.mustache", srcFolder, "api.dart")); final String authFolder = srcFolder + File.separator + "auth"; @@ -253,8 +249,8 @@ public class DartDioNextClientCodegen extends AbstractDartCodegen { if (SERIALIZATION_LIBRARY_BUILT_VALUE.equals(library)) { typeMapping.put("date", "Date"); typeMapping.put("Date", "Date"); - importMapping.put("Date", "package:" + pubName + "/src/model/date.dart"); - supportingFiles.add(new SupportingFile("serialization/built_value/date.mustache", srcFolder + File.separator + "model", "date.dart")); + importMapping.put("Date", "package:" + pubName + "/" + sourceFolder + "/" + modelPackage() + "/date.dart"); + supportingFiles.add(new SupportingFile("serialization/built_value/date.mustache", srcFolder + File.separator + modelPackage(), "date.dart")); supportingFiles.add(new SupportingFile("serialization/built_value/date_serializer.mustache", srcFolder, "date_serializer.dart")); } break; @@ -382,7 +378,7 @@ public class DartDioNextClientCodegen extends AbstractDartCodegen { resultImports.addAll(rewriteImports(op.imports, false)); if (op.getHasFormParams() || op.getHasQueryParams()) { - resultImports.add("package:" + pubName + "/src/api_util.dart"); + resultImports.add("package:" + pubName + "/" + sourceFolder + "/api_util.dart"); } // Generate serializer factories for response types. @@ -437,7 +433,7 @@ public class DartDioNextClientCodegen extends AbstractDartCodegen { } else if (importMapping().containsKey(modelImport)) { resultImports.add(importMapping().get(modelImport)); } else { - resultImports.add("package:" + pubName + "/src/model/" + underscore(modelImport) + ".dart"); + resultImports.add("package:" + pubName + "/" + sourceFolder + "/" + modelPackage() + "/" + underscore(modelImport) + ".dart"); } } return resultImports; diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/api_client.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/api_client.mustache index 35fabd973d1e639da25154b869d31e2fe13b8be3..0903a48759e1818a5f76b3f161fc58b46aaaec8c 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/api_client.mustache @@ -1,12 +1,12 @@ {{>header}} import 'package:dio/dio.dart';{{#useBuiltValue}} import 'package:built_value/serializer.dart'; -import 'package:{{pubName}}/src/serializers.dart';{{/useBuiltValue}} -import 'package:{{pubName}}/src/auth/api_key_auth.dart'; -import 'package:{{pubName}}/src/auth/basic_auth.dart'; -import 'package:{{pubName}}/src/auth/bearer_auth.dart'; -import 'package:{{pubName}}/src/auth/oauth.dart'; -{{#apiInfo}}{{#apis}}import 'package:{{pubName}}/src/api/{{classFilename}}.dart'; +import 'package:{{pubName}}/{{sourceFolder}}/serializers.dart';{{/useBuiltValue}} +import 'package:{{pubName}}/{{sourceFolder}}/auth/api_key_auth.dart'; +import 'package:{{pubName}}/{{sourceFolder}}/auth/basic_auth.dart'; +import 'package:{{pubName}}/{{sourceFolder}}/auth/bearer_auth.dart'; +import 'package:{{pubName}}/{{sourceFolder}}/auth/oauth.dart'; +{{#apiInfo}}{{#apis}}import 'package:{{pubName}}/{{sourceFolder}}/{{apiPackage}}/{{classFilename}}.dart'; {{/apis}}{{/apiInfo}} class {{clientName}} { static const String basePath = r'{{{basePath}}}'; diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/api_key_auth.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/api_key_auth.mustache index 2174d159630b2d6a43de9ce6cbe57d8906e0db22..5d9da99bd5d8822160b4109611b6b718cd8fb869 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/api_key_auth.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/api_key_auth.mustache @@ -1,7 +1,7 @@ {{>header}} import 'package:dio/dio.dart'; -import 'package:{{pubName}}/src/auth/auth.dart'; +import 'package:{{pubName}}/{{sourceFolder}}/auth/auth.dart'; class ApiKeyAuthInterceptor extends AuthInterceptor { final Map<String, String> apiKeys = {}; diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/basic_auth.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/basic_auth.mustache index c286274c3a23720818b189c4ca0014b843fccd6f..c2a4426937da536185b7507127866a55b97d9452 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/basic_auth.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/basic_auth.mustache @@ -2,7 +2,7 @@ import 'dart:convert'; import 'package:dio/dio.dart'; -import 'package:{{pubName}}/src/auth/auth.dart'; +import 'package:{{pubName}}/{{sourceFolder}}/auth/auth.dart'; class BasicAuthInfo { final String username; diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/bearer_auth.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/bearer_auth.mustache index 626c7d238d033ae2c6b43fad9425d6cf07fc03af..b4bce45ca61febd240a653f05c4fdfb3250139e5 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/bearer_auth.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/bearer_auth.mustache @@ -1,6 +1,6 @@ {{>header}} import 'package:dio/dio.dart'; -import 'package:{{pubName}}/src/auth/auth.dart'; +import 'package:{{pubName}}/{{sourceFolder}}/auth/auth.dart'; class BearerAuthInterceptor extends AuthInterceptor { final Map<String, String> tokens = {}; diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/oauth.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/oauth.mustache index 4f7b79655af93035a2ace2eb62294122ef5f5421..e5af801f39becd1a61577e8df43472e3212e11f1 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/oauth.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/auth/oauth.mustache @@ -1,6 +1,6 @@ {{>header}} import 'package:dio/dio.dart'; -import 'package:{{pubName}}/src/auth/auth.dart'; +import 'package:{{pubName}}/{{sourceFolder}}/auth/auth.dart'; class OAuthInterceptor extends AuthInterceptor { final Map<String, String> tokens = {}; diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/lib.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/lib.mustache index 32f6a54b1a64585d5a2b314468050497327cdcfd..1ac711810617ba38d14d1308c68da8a4c48067e7 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/lib.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/lib.mustache @@ -1,12 +1,12 @@ {{>header}} -export 'package:{{pubName}}/src/api.dart'; -export 'package:{{pubName}}/src/auth/api_key_auth.dart'; -export 'package:{{pubName}}/src/auth/basic_auth.dart'; -export 'package:{{pubName}}/src/auth/oauth.dart'; -{{#useBuiltValue}}export 'package:{{pubName}}/src/serializers.dart'; -{{#useDateLibCore}}export 'package:{{pubName}}/src/model/date.dart';{{/useDateLibCore}}{{/useBuiltValue}} +export 'package:{{pubName}}/{{sourceFolder}}/api.dart'; +export 'package:{{pubName}}/{{sourceFolder}}/auth/api_key_auth.dart'; +export 'package:{{pubName}}/{{sourceFolder}}/auth/basic_auth.dart'; +export 'package:{{pubName}}/{{sourceFolder}}/auth/oauth.dart'; +{{#useBuiltValue}}export 'package:{{pubName}}/{{sourceFolder}}/serializers.dart'; +{{#useDateLibCore}}export 'package:{{pubName}}/{{sourceFolder}}/{{modelPackage}}/date.dart';{{/useDateLibCore}}{{/useBuiltValue}} -{{#apiInfo}}{{#apis}}export 'package:{{pubName}}/src/api/{{classFilename}}.dart'; +{{#apiInfo}}{{#apis}}export 'package:{{pubName}}/{{sourceFolder}}/{{apiPackage}}/{{classFilename}}.dart'; {{/apis}}{{/apiInfo}} -{{#models}}{{#model}}export 'package:{{pubName}}/src/model/{{classFilename}}.dart'; +{{#models}}{{#model}}export 'package:{{pubName}}/{{sourceFolder}}/{{modelPackage}}/{{classFilename}}.dart'; {{/model}}{{/models}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/date_serializer.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/date_serializer.mustache index b5f0ed32c22f7d659ab6f08ee538a88c68b627f4..dc16805ce62821886984225f93ff0fedab7d3749 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/date_serializer.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/date_serializer.mustache @@ -1,7 +1,7 @@ {{>header}} import 'package:built_collection/built_collection.dart'; import 'package:built_value/serializer.dart'; -import 'package:{{pubName}}/src/model/date.dart'; +import 'package:{{pubName}}/{{sourceFolder}}/{{modelPackage}}/date.dart'; class DateSerializer implements PrimitiveSerializer<Date> { diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/serializers.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/serializers.mustache index c558f153c890639ebdf4cf77617453a920e9f81c..7ef191808eb298e1789a22eb4a898f2803e085f6 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/serializers.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/serializers.mustache @@ -6,11 +6,11 @@ import 'package:built_value/json_object.dart'; import 'package:built_value/serializer.dart'; import 'package:built_value/standard_json_plugin.dart'; {{#useDateLibCore}}import 'package:built_value/iso_8601_date_time_serializer.dart'; -import 'package:{{pubName}}/src/date_serializer.dart'; -import 'package:{{pubName}}/src/model/date.dart';{{/useDateLibCore}} +import 'package:{{pubName}}/{{sourceFolder}}/date_serializer.dart'; +import 'package:{{pubName}}/{{sourceFolder}}/{{modelPackage}}/date.dart';{{/useDateLibCore}} {{#useDateLibTimeMachine}}import 'package:time_machine/time_machine.dart'; -import 'package:{{pubName}}/src/offset_date_serializer.dart';{{/useDateLibTimeMachine}} -{{#models}}{{#model}}import 'package:{{pubName}}/src/model/{{classFilename}}.dart'; +import 'package:{{pubName}}/{{sourceFolder}}/offset_date_serializer.dart';{{/useDateLibTimeMachine}} +{{#models}}{{#model}}import 'package:{{pubName}}/{{sourceFolder}}/{{modelPackage}}/{{classFilename}}.dart'; {{/model}}{{/models}}{{#builtValueSerializerImports}}import '{{{.}}}'; {{/builtValueSerializerImports}}