From 5b1b74e48d89c7ebc84d9f961772a6b0135d3d87 Mon Sep 17 00:00:00 2001 From: agilob Date: Fri, 8 Oct 2021 03:47:17 +0100 Subject: [PATCH] Dart-jaguar: remove (#10534) --- .github/.test/samples.json | 8 +- .gitignore | 3 - docs/generators.md | 1 - docs/generators/README.md | 1 - docs/generators/dart-jaguar.md | 232 ------------------ .../org.openapitools.codegen.CodegenConfig | 1 - .../resources/dart-jaguar/README.mustache | 141 ----------- .../dart-jaguar/analysis_options.mustache | 1 - .../main/resources/dart-jaguar/api.mustache | 78 ------ .../resources/dart-jaguar/api_doc.mustache | 86 ------- .../resources/dart-jaguar/api_test.mustache | 28 --- .../resources/dart-jaguar/apilib.mustache | 100 -------- .../dart-jaguar/auth/api_key_auth.mustache | 33 --- .../resources/dart-jaguar/auth/auth.mustache | 23 -- .../dart-jaguar/auth/basic_auth.mustache | 34 --- .../resources/dart-jaguar/auth/oauth.mustache | 25 -- .../main/resources/dart-jaguar/class.mustache | 41 ---- .../main/resources/dart-jaguar/enum.mustache | 37 --- .../dart-jaguar/git_push.sh.mustache | 57 ----- .../resources/dart-jaguar/gitignore.mustache | 27 -- .../main/resources/dart-jaguar/model.mustache | 12 - .../resources/dart-jaguar/model_test.mustache | 26 -- .../resources/dart-jaguar/object_doc.mustache | 16 -- .../resources/dart-jaguar/pubspec.mustache | 20 -- .../resources/dart-jaguar/travis.mustache | 11 - 25 files changed, 1 insertion(+), 1041 deletions(-) delete mode 100644 docs/generators/dart-jaguar.md delete mode 100644 modules/openapi-generator/src/main/resources/dart-jaguar/README.mustache delete mode 100644 modules/openapi-generator/src/main/resources/dart-jaguar/analysis_options.mustache delete mode 100644 modules/openapi-generator/src/main/resources/dart-jaguar/api.mustache delete mode 100644 modules/openapi-generator/src/main/resources/dart-jaguar/api_doc.mustache delete mode 100644 modules/openapi-generator/src/main/resources/dart-jaguar/api_test.mustache delete mode 100644 modules/openapi-generator/src/main/resources/dart-jaguar/apilib.mustache delete mode 100644 modules/openapi-generator/src/main/resources/dart-jaguar/auth/api_key_auth.mustache delete mode 100644 modules/openapi-generator/src/main/resources/dart-jaguar/auth/auth.mustache delete mode 100644 modules/openapi-generator/src/main/resources/dart-jaguar/auth/basic_auth.mustache delete mode 100644 modules/openapi-generator/src/main/resources/dart-jaguar/auth/oauth.mustache delete mode 100644 modules/openapi-generator/src/main/resources/dart-jaguar/class.mustache delete mode 100644 modules/openapi-generator/src/main/resources/dart-jaguar/enum.mustache delete mode 100755 modules/openapi-generator/src/main/resources/dart-jaguar/git_push.sh.mustache delete mode 100644 modules/openapi-generator/src/main/resources/dart-jaguar/gitignore.mustache delete mode 100644 modules/openapi-generator/src/main/resources/dart-jaguar/model.mustache delete mode 100644 modules/openapi-generator/src/main/resources/dart-jaguar/model_test.mustache delete mode 100644 modules/openapi-generator/src/main/resources/dart-jaguar/object_doc.mustache delete mode 100644 modules/openapi-generator/src/main/resources/dart-jaguar/pubspec.mustache delete mode 100644 modules/openapi-generator/src/main/resources/dart-jaguar/travis.mustache diff --git a/.github/.test/samples.json b/.github/.test/samples.json index d756cc45dfd..b1ee2dac99e 100644 --- a/.github/.test/samples.json +++ b/.github/.test/samples.json @@ -145,12 +145,6 @@ "Documentation: Cwiki" ] }, - { - "input": "dart-jaguar-petstore.sh", - "matches": [ - "Client: Dart" - ] - }, { "input": "dart-dio-petstore.sh", "matches": [ @@ -1401,4 +1395,4 @@ "matches": [] } ] -} \ No newline at end of file +} diff --git a/.gitignore b/.gitignore index 728a1667834..8787a3b7702 100644 --- a/.gitignore +++ b/.gitignore @@ -249,9 +249,6 @@ samples/server/petstore/erlang-server/rebar.lock **/dart*/**/pubspec.lock # Dart dio **/dart*/**/*.g.dart -# Dart jaguar -**/dart*/**/*.jser.dart -**/dart*/**/*.jretro.dart # JS samples/client/petstore/javascript-es6/package-lock.json diff --git a/docs/generators.md b/docs/generators.md index ed80e860e49..41df7176c11 100644 --- a/docs/generators.md +++ b/docs/generators.md @@ -24,7 +24,6 @@ The following generators are available: * [dart](generators/dart.md) * [dart-dio](generators/dart-dio.md) * [dart-dio-next (experimental)](generators/dart-dio-next.md) -* [dart-jaguar (deprecated)](generators/dart-jaguar.md) * [eiffel](generators/eiffel.md) * [elixir](generators/elixir.md) * [elm](generators/elm.md) diff --git a/docs/generators/README.md b/docs/generators/README.md index b9e8926f664..f729a7121c4 100644 --- a/docs/generators/README.md +++ b/docs/generators/README.md @@ -15,7 +15,6 @@ The following generators are available: * [csharp-netcore](csharp-netcore.md) * [dart](dart.md) * [dart-dio](dart-dio.md) -* [dart-jaguar](dart-jaguar.md) * [eiffel](eiffel.md) * [elixir](elixir.md) * [elm](elm.md) diff --git a/docs/generators/dart-jaguar.md b/docs/generators/dart-jaguar.md deleted file mode 100644 index 068b5728f02..00000000000 --- a/docs/generators/dart-jaguar.md +++ /dev/null @@ -1,232 +0,0 @@ ---- -title: Config Options for dart-jaguar -sidebar_label: dart-jaguar ---- - -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.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
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.
|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 - - - -## RESERVED WORDS - - - -## 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/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig index 78855ce50ad..3d743829ad8 100644 --- a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig +++ b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig @@ -26,7 +26,6 @@ org.openapitools.codegen.languages.CSharpNancyFXServerCodegen org.openapitools.codegen.languages.DartClientCodegen org.openapitools.codegen.languages.DartDioClientCodegen org.openapitools.codegen.languages.DartDioNextClientCodegen -org.openapitools.codegen.languages.DartJaguarClientCodegen org.openapitools.codegen.languages.EiffelClientCodegen org.openapitools.codegen.languages.ElixirClientCodegen org.openapitools.codegen.languages.ElmClientCodegen diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/README.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/README.mustache deleted file mode 100644 index 9296cc85904..00000000000 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/README.mustache +++ /dev/null @@ -1,141 +0,0 @@ -# {{pubName}} -{{#appDescriptionWithNewLines}} -{{{.}}} -{{/appDescriptionWithNewLines}} - -This Dart package is automatically generated by the [Open API Codegen](https://github.com/OpenAPITools/openapi-generator) project: - -- API version: {{appVersion}} -{{#artifactVersion}} -- Package version: {{.}} -{{/artifactVersion}} -{{^hideGenerationTimestamp}} -- Build date: {{generatedDate}} -{{/hideGenerationTimestamp}} -- Build package: {{generatorClass}} -{{#infoUrl}} -For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) -{{/infoUrl}} - -## Requirements - -Dart 2 or later OR Flutter 0.7.0 or later. - -Once your code is generated, you need to run the build_runner command to let Jaguar implement your API: - -```sh -flutter packages pub run build_runner build -or -pub run build_runner build -``` - -## Installation & Usage - -### Github -If this Dart package is published to Github, please include the following in pubspec.yaml -``` -name: {{pubName}} -version: {{pubVersion}} -description: {{pubDescription}} -dependencies: - {{pubName}}: - git: https://{{gitHost}}/{{gitUserId}}/{{gitRepoId}}.git - version: 'any' -``` - -### Local -To use the package in your local drive, please include the following in pubspec.yaml -``` -dependencies: - {{pubName}}: - path: /path/to/{{pubName}} -``` - -## Tests - -TODO - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```dart -import 'package:{{pubName}}/api.dart'; -{{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}} -{{#hasAuthMethods}} -{{#authMethods}} -{{#isBasic}} -// TODO Configure HTTP basic authorization: {{{name}}} -//{{pubName}}.api.Configuration.username = 'YOUR_USERNAME'; -//{{pubName}}.api.Configuration.password = 'YOUR_PASSWORD'; -{{/isBasic}} -{{#isApiKey}} -// TODO Configure API key authorization: {{{name}}} -//{{pubName}}.api.Configuration.apiKey{'{{{keyParamName}}}'} = 'YOUR_API_KEY'; -// uncomment below to setup prefix (e.g. Bearer) for API key, if needed -//{{pubName}}.api.Configuration.apiKeyPrefix{'{{{keyParamName}}}'} = "Bearer"; -{{/isApiKey}} -{{#isOAuth}} -// TODO Configure OAuth2 access token for authorization: {{{name}}} -//{{pubName}}.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; -{{/isOAuth}} -{{/authMethods}} -{{/hasAuthMethods}} - -final jaguarApiGen = {{clientName}}(); -var api_instance = jaguarApiGen.get{{classname}}(); -{{#allParams}} -var {{paramName}} = {{#isArray}}[{{/isArray}}{{#isBodyParam}}new {{dataType}}(){{/isBodyParam}}{{^isBodyParam}}{{{example}}}{{/isBodyParam}}{{#isArray}}]{{/isArray}}; // {{{dataType}}} | {{{description}}} -{{/allParams}} - -try { - {{#returnType}}var result = {{/returnType}}api_instance.{{{operationId}}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); - {{#returnType}} - print(result); - {{/returnType}} -} catch (e) { - print("Exception when calling {{classname}}->{{operationId}}: $e\n"); -} -{{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}} -``` - -## Documentation for API Endpoints - -All URIs are relative to *{{basePath}}* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}/{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{summary}} -{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} - -## Documentation For Models - -{{#models}}{{#model}} - [{{{classname}}}]({{modelDocPath}}/{{{classname}}}.md) -{{/model}}{{/models}} - -## Documentation For Authorization - -{{^authMethods}} All endpoints do not require authorization. -{{/authMethods}}{{#authMethods}}{{#last}} Authentication schemes defined for the API:{{/last}}{{/authMethods}} -{{#authMethods}}## {{{name}}} - -{{#isApiKey}}- **Type**: API key -- **API key parameter name**: {{{keyParamName}}} -- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}} -{{/isApiKey}} -{{#isBasic}}- **Type**: HTTP basic authentication -{{/isBasic}} -{{#isOAuth}}- **Type**: OAuth -- **Flow**: {{{flow}}} -- **Authorization URL**: {{{authorizationUrl}}} -- **Scopes**: {{^scopes}}N/A{{/scopes}} -{{#scopes}} - **{{{scope}}}**: {{{description}}} -{{/scopes}} -{{/isOAuth}} - -{{/authMethods}} - -## Author - -{{#apiInfo}}{{#apis}}{{#-last}}{{infoEmail}} -{{/-last}}{{/apis}}{{/apiInfo}} diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/analysis_options.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/analysis_options.mustache deleted file mode 100644 index 655cb67bd88..00000000000 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/analysis_options.mustache +++ /dev/null @@ -1 +0,0 @@ -analyzer: \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/api.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/api.mustache deleted file mode 100644 index 7aef336eda4..00000000000 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/api.mustache +++ /dev/null @@ -1,78 +0,0 @@ -import 'package:jaguar_retrofit/annotations/annotations.dart'; -import 'package:jaguar_retrofit/jaguar_retrofit.dart'; -import 'package:jaguar_serializer/jaguar_serializer.dart'; -import 'package:jaguar_mimetype/jaguar_mimetype.dart'; -import 'dart:async'; - -{{#operations}} -{{#modelImports}}import 'package:{{pubName}}/model/{{.}}{{#protoFormat}}.pb{{/protoFormat}}.dart'; -{{/modelImports}} -{{#fullImports}}import '{{.}}'; -{{/fullImports}} - -part '{{classFilename}}.jretro.dart'; - -@GenApiClient() -class {{classname}} extends ApiClient with _${{classname}}Client { - final Route base; - final Map converters; - final Duration timeout; - - {{classname}}({this.base, this.converters, this.timeout = const Duration(minutes: 2)}); - - {{#operation}} - /// {{summary}} - /// - /// {{notes}} - @{{httpMethod}}Req(path: "{{path}}"{{#hasAuthMethods}}, metadata: {"auth": [{{#authMethods}} {"type": "{{type}}", "name": "{{name}}"{{#isApiKey}}, "keyName": "{{keyParamName}}", "where": "{{#isKeyInQuery}}query{{/isKeyInQuery}}{{#isKeyInHeader}}header{{/isKeyInHeader}}"{{/isApiKey}} }{{^-last}}, {{/-last}}{{/authMethods}}]}{{/hasAuthMethods}}) - Future<{{{returnType}}}{{^returnType}}void{{/returnType}}> {{nickname}}( - {{#pathParams}} - @PathParam("{{baseName}}") {{dataType}} {{paramName}}{{^-last}}, {{/-last}} - {{/pathParams}} - {{#headerParams}} - {{#-first}}{{#hasPathParams}},{{/hasPathParams}}{{/-first}} - @Header("{{baseName}}") {{{dataType}}} {{paramName}}{{^-last}}, {{/-last}} - {{/headerParams}} - {{#queryParams}} - {{#-first}}{{#hasHeaderParams}},{{/hasHeaderParams}}{{^hasHeaderParams}}{{#hasPathParams}},{{/hasPathParams}}{{/hasHeaderParams}}{{/-first}} - @QueryParam("{{baseName}}") {{{dataType}}} {{paramName}}{{^-last}}, {{/-last}} - {{/queryParams}} - {{#vendorExtensions}} - {{#formParams}} - {{#-first}}{{#hasQueryParams}},{{/hasQueryParams}}{{^hasQueryParams}}{{#hasHeaderParams}},{{/hasHeaderParams}}{{/hasQueryParams}}{{^hasQueryParams}}{{^hasHeaderParams}}{{#hasPathParams}},{{/hasPathParams}}{{/hasHeaderParams}}{{/hasQueryParams}}{{/-first}} - {{#x-is-json}}@AsJson() {{/x-is-json}}{{#x-is-form}}@AsFormField() {{/x-is-form}}{{#x-is-multipart}}@AsMultipartField() {{/x-is-multipart}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}} - {{/formParams}} - {{#bodyParam}} - {{#hasFormParams}},{{/hasFormParams}}{{^hasFormParams}}{{#hasQueryParams}},{{/hasQueryParams}}{{/hasFormParams}}{{^hasFormParams}}{{^hasQueryParams}}{{#hasHeaderParams}},{{/hasHeaderParams}}{{/hasQueryParams}}{{/hasFormParams}}{{^hasFormParams}}{{^hasQueryParams}}{{^hasHeaderParams}}{{#hasPathParams}},{{/hasPathParams}}{{/hasHeaderParams}}{{/hasQueryParams}}{{/hasFormParams}} - {{^x-is-proto}}{{^x-is-json}}{{^x-is-form}}{{^x-is-multipart}}@AsBody(){{/x-is-multipart}}{{/x-is-form}}{{/x-is-json}}{{/x-is-proto}} {{#x-is-proto}}@Serialized(MimeTypes.binary) {{/x-is-proto}}{{#x-is-json}}@AsJson() {{/x-is-json}}{{#x-is-form}}@AsForm() {{/x-is-form}}{{#x-is-multipart}}@AsMultipart() {{/x-is-multipart}}{{{dataType}}} {{paramName}} - {{/bodyParam}} - {{/vendorExtensions}} - ) { - return super.{{nickname}}( - {{#pathParams}} - {{paramName}}{{^-last}}, {{/-last}} - {{/pathParams}} - {{#headerParams}} - {{#-first}}{{#hasPathParams}},{{/hasPathParams}}{{/-first}} - {{paramName}}{{^-last}}, {{/-last}} - {{/headerParams}} - {{#queryParams}} - {{#-first}}{{#hasHeaderParams}},{{/hasHeaderParams}}{{^hasHeaderParams}}{{#hasPathParams}},{{/hasPathParams}}{{/hasHeaderParams}}{{/-first}} - {{paramName}}{{^-last}}, {{/-last}} - {{/queryParams}} - - {{#formParams}} - {{#-first}}{{#hasQueryParams}},{{/hasQueryParams}}{{^hasQueryParams}}{{#hasHeaderParams}},{{/hasHeaderParams}}{{/hasQueryParams}}{{^hasQueryParams}}{{^hasHeaderParams}}{{#hasPathParams}},{{/hasPathParams}}{{/hasHeaderParams}}{{/hasQueryParams}}{{/-first}} - {{paramName}}{{^-last}}, {{/-last}} - {{/formParams}} - {{#bodyParam}} - {{#hasFormParams}},{{/hasFormParams}}{{^hasFormParams}}{{#hasQueryParams}},{{/hasQueryParams}}{{/hasFormParams}}{{^hasFormParams}}{{^hasQueryParams}}{{#hasHeaderParams}},{{/hasHeaderParams}}{{/hasQueryParams}}{{/hasFormParams}}{{^hasFormParams}}{{^hasQueryParams}}{{^hasHeaderParams}}{{#hasPathParams}},{{/hasPathParams}}{{/hasHeaderParams}}{{/hasQueryParams}}{{/hasFormParams}} - {{paramName}} - {{/bodyParam}} - ).timeout(timeout); - } - - {{/operation}} - -} -{{/operations}} diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/api_doc.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/api_doc.mustache deleted file mode 100644 index ad0c61a6673..00000000000 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/api_doc.mustache +++ /dev/null @@ -1,86 +0,0 @@ -# {{pubName}}.api.{{classname}}{{#description}} -{{.}}{{/description}} - -## Load the API package -```dart -import 'package:{{pubName}}/api.dart'; -``` - -All URIs are relative to *{{basePath}}* - -Method | HTTP request | Description -------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{summary}} -{{/operation}}{{/operations}} - -{{#operations}} -{{#operation}} -# **{{{operationId}}}** -> {{#returnType}}{{{.}}} {{/returnType}}{{{operationId}}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) - -{{{summary}}}{{#notes}} - -{{{.}}}{{/notes}} - -### Example -```dart -import 'package:{{pubName}}/api.dart'; -{{#hasAuthMethods}} -{{#authMethods}} -{{#isBasic}} -// TODO Configure HTTP basic authorization: {{{name}}} -//{{pubName}}.api.Configuration.username = 'YOUR_USERNAME'; -//{{pubName}}.api.Configuration.password = 'YOUR_PASSWORD'; -{{/isBasic}} -{{#isApiKey}} -// TODO Configure API key authorization: {{{name}}} -//{{pubName}}.api.Configuration.apiKey{'{{{keyParamName}}}'} = 'YOUR_API_KEY'; -// uncomment below to setup prefix (e.g. Bearer) for API key, if needed -//{{pubName}}.api.Configuration.apiKeyPrefix{'{{{keyParamName}}}'} = "Bearer"; -{{/isApiKey}} -{{#isOAuth}} -// TODO Configure OAuth2 access token for authorization: {{{name}}} -//{{pubName}}.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; -{{/isOAuth}} -{{/authMethods}} -{{/hasAuthMethods}} - -var api_instance = new {{classname}}(); -{{#allParams}} -var {{paramName}} = {{#isArray}}[{{/isArray}}{{#isBodyParam}}new {{dataType}}(){{/isBodyParam}}{{^isBodyParam}}{{{example}}}{{/isBodyParam}}{{#isArray}}]{{/isArray}}; // {{{dataType}}} | {{{description}}} -{{/allParams}} - -try { - {{#returnType}}var result = {{/returnType}}api_instance.{{{operationId}}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); - {{#returnType}} - print(result); - {{/returnType}} -} catch (e) { - print("Exception when calling {{classname}}->{{operationId}}: $e\n"); -} -``` - -### Parameters -{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} -Name | Type | Description | Notes -------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} -{{#allParams}} **{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{.}}]{{/defaultValue}} -{{/allParams}} - -### Return type - -{{#returnType}}{{#returnTypeIsPrimitive}}**{{{returnType}}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{{returnType}}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}void (empty response body){{/returnType}} - -### Authorization - -{{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{{name}}}](../README.md#{{{name}}}){{^-last}}, {{/-last}}{{/authMethods}} - -### HTTP request headers - - - **Content-Type**: {{#consumes}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} - - **Accept**: {{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}{{^produces}}Not defined{{/produces}} - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -{{/operation}} -{{/operations}} diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/api_test.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/api_test.mustache deleted file mode 100644 index d44b5bdef2f..00000000000 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/api_test.mustache +++ /dev/null @@ -1,28 +0,0 @@ -import 'package:{{pubName}}/api.dart'; -import 'package:test/test.dart'; - -{{#operations}} - -/// tests for {{classname}} -void main() { - var instance = new {{classname}}(); - - group('tests for {{classname}}', () { - {{#operation}} - {{#summary}} - // {{{.}}} - // - {{/summary}} - {{#notes}} - // {{{.}}} - // - {{/notes}} - //{{#returnType}}Future<{{{.}}}> {{/returnType}}{{^returnType}}Future {{/returnType}}{{operationId}}({{#allParams}}{{#required}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#hasOptionalParams}}{ {{#allParams}}{{^required}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/required}}{{/allParams}} }{{/hasOptionalParams}}) async - test('test {{operationId}}', () async { - // TODO - }); - - {{/operation}} - }); -} -{{/operations}} diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/apilib.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/apilib.mustache deleted file mode 100644 index b162a53ad4b..00000000000 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/apilib.mustache +++ /dev/null @@ -1,100 +0,0 @@ -library {{pubName}}.api; - -import 'package:http/http.dart' as http; -import 'package:jaguar_serializer/jaguar_serializer.dart'; -{{#protoFormat}} -import 'package:jaguar_serializer_protobuf/proto_repo.dart'; -{{/protoFormat}} -import 'package:jaguar_retrofit/jaguar_retrofit.dart'; -import 'package:{{pubName}}/auth/api_key_auth.dart'; -import 'package:{{pubName}}/auth/basic_auth.dart'; -import 'package:{{pubName}}/auth/oauth.dart'; -import 'package:jaguar_mimetype/jaguar_mimetype.dart'; - -{{#apiInfo}}{{#apis}}import 'package:{{pubName}}/api/{{classFilename}}.dart'; -{{/apis}}{{/apiInfo}} -{{#models}}{{#model}}import 'package:{{pubName}}/model/{{classFilename}}{{#protoFormat}}.pb{{/protoFormat}}.dart'; -{{/model}}{{/models}} - - -{{#jsonFormat}} -final _jsonJaguarRepo = JsonRepo() -{{#models}}{{#model}}{{^isEnum}}..add({{classname}}Serializer()){{/isEnum}} -{{/model}}{{/models}}; -final Map defaultConverters = { - MimeTypes.json: _jsonJaguarRepo, -}; -{{/jsonFormat}} - -{{#protoFormat}} -final _protoJaguarRepo = ProtoCodecRepo() -{{#models}}{{#model}}..add((data) => {{classname}}.fromBuffer(List.from(data))) -{{/model}}{{/models}}; -final _jsonJaguarRepo = ProtoCodecRepo(isJsonFormatEnabled: true) -{{#models}}{{#model}}..add((data) => {{classname}}.fromBuffer(List.from(data))) -{{/model}}{{/models}}; -final Map defaultConverters = { - MimeTypes.json: _jsonJaguarRepo, - MimeTypes.binary: _protoJaguarRepo, -}; -{{/protoFormat}} - - -final _defaultInterceptors = [OAuthInterceptor(), BasicAuthInterceptor(), ApiKeyAuthInterceptor()]; - -class {{clientName}} { - List interceptors; - String basePath = "{{basePath}}"; - Route _baseRoute; - final Duration timeout; - - /** - * Add custom global interceptors, put overrideInterceptors to true to set your interceptors only (auth interceptors will not be added) - */ - {{clientName}}({List interceptors, bool overrideInterceptors = false, String baseUrl, this.timeout = const Duration(minutes: 2)}) { - _baseRoute = Route(baseUrl ?? basePath).withClient(globalClient ?? http.Client()); - if(interceptors == null) { - this.interceptors = _defaultInterceptors; - } - else if(overrideInterceptors){ - this.interceptors = interceptors; - } - else { - this.interceptors = List.from(_defaultInterceptors)..addAll(interceptors); - } - - this.interceptors.forEach((interceptor) { - _baseRoute.before(interceptor.before); - _baseRoute.after(interceptor.after); - }); - } - - void setOAuthToken(String name, String token) { - (_defaultInterceptors[0] as OAuthInterceptor).tokens[name] = token; - } - - void setBasicAuth(String name, String username, String password) { - (_defaultInterceptors[1] as BasicAuthInterceptor).authInfo[name] = BasicAuthInfo(username, password); - } - - void setApiKey(String name, String apiKey) { - (_defaultInterceptors[2] as ApiKeyAuthInterceptor).apiKeys[name] = apiKey; - } - - {{#apiInfo}}{{#apis}} - /** - * Get {{classname}} instance, base route and serializer can be overridden by a given but be careful, - * by doing that all interceptors will not be executed - */ - {{classname}} get{{classname}}({Route base, Map converters}) { - if(base == null) { - base = _baseRoute; - } - if(converters == null) { - converters = defaultConverters; - } - return {{classname}}(base: base, converters: converters, timeout: timeout); - } - - {{/apis}}{{/apiInfo}} -} diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/auth/api_key_auth.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/auth/api_key_auth.mustache deleted file mode 100644 index feb0ba65712..00000000000 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/auth/api_key_auth.mustache +++ /dev/null @@ -1,33 +0,0 @@ -import 'dart:async'; -import 'package:{{pubName}}/auth/auth.dart'; -import 'package:jaguar_retrofit/jaguar_retrofit.dart'; - -class ApiKeyAuthInterceptor extends AuthInterceptor { - Map apiKeys = {}; - - @override - FutureOr before(RouteBase route) { - final authInfo = getAuthInfo(route, "apiKey"); - for (var info in authInfo) { - final authName = info["name"]; - final authKeyName = info["keyName"]; - final authWhere = info["where"]; - final apiKey = apiKeys[authName]; - if(apiKey != null) { - if(authWhere == 'query'){ - route.query(authKeyName, apiKey); - } - else { - route.header(authKeyName, apiKey); - } - break; - } - } - return super.before(route); - } - - @override - FutureOr after(StringResponse response) { - return Future.value(response); - } -} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/auth/auth.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/auth/auth.mustache deleted file mode 100644 index 477fbbf8374..00000000000 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/auth/auth.mustache +++ /dev/null @@ -1,23 +0,0 @@ -import 'dart:async'; - -import 'package:jaguar_retrofit/jaguar_retrofit.dart'; - -abstract class AuthInterceptor extends Interceptor { - /* - * Get auth information on given route for the given type - * Can return null if type is not present on auth data or if route doesn't need authentication - */ - List> getAuthInfo(RouteBase route, String type) { - if (route.metadataMap.containsKey("auth")) { - final auth = route.metadataMap["auth"]; - List> results = []; - for (var info in auth) { - if(info["type"] == type) { - results.add(info); - } - } - return results; - } - return []; - } -} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/auth/basic_auth.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/auth/basic_auth.mustache deleted file mode 100644 index 962be36d664..00000000000 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/auth/basic_auth.mustache +++ /dev/null @@ -1,34 +0,0 @@ -import 'dart:async'; -import 'package:{{pubName}}/auth/auth.dart'; -import 'package:jaguar_retrofit/jaguar_retrofit.dart'; - -class BasicAuthInfo { - final String username; - final String password; - - const BasicAuthInfo(this.username, this.password); - -} - -class BasicAuthInterceptor extends AuthInterceptor { - Map authInfo = {}; - - @override - FutureOr before(RouteBase route) { - final metadataAuthInfo = getAuthInfo(route, "basic"); - for (var info in metadataAuthInfo) { - final authName = info["name"]; - final basicAuthInfo = authInfo[authName]; - if(basicAuthInfo != null) { - route.basicAuth(basicAuthInfo.username, basicAuthInfo.password); - break; - } - } - return super.before(route); - } - - @override - FutureOr after(StringResponse response) { - return Future.value(response); - } -} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/auth/oauth.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/auth/oauth.mustache deleted file mode 100644 index f12a63c45b5..00000000000 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/auth/oauth.mustache +++ /dev/null @@ -1,25 +0,0 @@ -import 'dart:async'; -import 'package:{{pubName}}/auth/auth.dart'; -import 'package:jaguar_retrofit/jaguar_retrofit.dart'; - -class OAuthInterceptor extends AuthInterceptor { - Map tokens = {}; - - @override - FutureOr before(RouteBase route) { - final authInfo = getAuthInfo(route, "oauth"); - for (var info in authInfo) { - final token = tokens[info["name"]]; - if(token != null) { - route.header("Authorization", "Bearer ${token}"); - break; - } - } - return super.before(route); - } - - @override - FutureOr after(StringResponse response) { - return Future.value(response); - } -} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/class.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/class.mustache deleted file mode 100644 index 6178bba374f..00000000000 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/class.mustache +++ /dev/null @@ -1,41 +0,0 @@ -{{#protoFormat}} -message {{classname}} { - {{#vars}} - {{#vendorExtensions}}{{{x-proto-type}}} {{name}} = {{x-index}}{{/vendorExtensions}}; - {{/vars}} -} -{{/protoFormat}} -{{#jsonFormat}} -part '{{classFilename}}.jser.dart'; - -class {{classname}} { - {{#vars}}{{#description}} /* {{{.}}} */{{/description}} - @Alias('{{{baseName}}}', isNullable:{{#isNullable}} true{{/isNullable}}{{^isNullable}} false{{/isNullable}},{{#allowableValues}} - {{^enumVars.empty}}{{^isString}}{{! isString because inline enums are not handled for now }} - processor: const {{{datatype}}}FieldProcessor(), - {{/isString}}{{/enumVars.empty}} - {{/allowableValues}} - ) - final {{{datatype}}} {{name}}; - {{#allowableValues}}{{#min}} // range from {{min}} to {{max}}{{/min}}//{{^min}}enum {{name}}Enum { {{#values}} {{.}}, {{/values}} };{{/min}}{{/allowableValues}}{{/vars}} - - {{classname}}( - {{#vars}}{{^defaultValue}}{{#required}} this.{{name}}, {{/required}}{{/defaultValue}}{{/vars}} - -{{#vendorExtensions}}{{#x-has-vars}}{ - {{#vars}}{{^required}} this.{{name}}{{#defaultValue}} = {{{defaultValue}}}{{^-last}}, {{/-last}} {{/defaultValue}}{{/required}} - {{#required}} {{#defaultValue}}this.{{name}} = {{{defaultValue}}}{{^-last}}, {{/-last}} {{/defaultValue}}{{/required}}{{/vars}} - }{{/x-has-vars}}{{/vendorExtensions}} - ); - - @override - String toString() { - return '{{classname}}[{{#vars}}{{name}}=${{name}}, {{/vars}}]'; - } -} - -@GenSerializer(nullableFields: {{nullableFields}}) -class {{classname}}Serializer extends Serializer<{{classname}}> with _${{classname}}Serializer { - -} -{{/jsonFormat}} diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/enum.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/enum.mustache deleted file mode 100644 index da8322afbe9..00000000000 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/enum.mustache +++ /dev/null @@ -1,37 +0,0 @@ - -{{#jsonFormat}} -class {{classname}} { - /// The underlying value of this enum member. - final {{dataType}} value; - - const {{classname}}._internal(this.value); - - {{#allowableValues}} - {{#enumVars}} - {{#description}} - /// {{.}} - {{/description}} - static const {{classname}} {{{name}}} = const {{classname}}._internal({{{value}}}); - {{/enumVars}} - {{/allowableValues}} -} - -class {{classname}}FieldProcessor implements FieldProcessor<{{classname}}, {{dataType}}> { - const {{classname}}FieldProcessor(); - - {{classname}} deserialize({{dataType}} data) { - switch (data) { - {{#allowableValues}} - {{#enumVars}} - case {{{value}}}: return {{classname}}.{{{name}}}; - {{/enumVars}} - {{/allowableValues}} - default: throw('Unknown enum value to decode: $data'); - } - } - - {{dataType}} serialize({{classname}} item) { - return item.value; - } -} -{{/jsonFormat}} diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/git_push.sh.mustache deleted file mode 100755 index 0e3776ae6dd..00000000000 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/git_push.sh.mustache +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="{{{gitHost}}}" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="{{{gitUserId}}}" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="{{{gitRepoId}}}" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="{{{releaseNote}}}" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/gitignore.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/gitignore.mustache deleted file mode 100644 index 8b7331fd822..00000000000 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/gitignore.mustache +++ /dev/null @@ -1,27 +0,0 @@ -# See https://www.dartlang.org/tools/private-files.html - -# Files and directories created by pub -.buildlog -.packages -.project -.pub/ -build/ -**/packages/ - -# Files created by dart2js -# (Most Dart developers will use pub build to compile Dart, use/modify these -# rules if you intend to use dart2js directly -# Convention is to use extension '.dart.js' for Dart compiled to Javascript to -# differentiate from explicit Javascript files) -*.dart.js -*.part.js -*.js.deps -*.js.map -*.info.json - -# Directory created by dartdoc -doc/api/ - -# Don't commit pubspec lock file -# (Library packages only! Remove pattern if developing an application package) -pubspec.lock diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/model.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/model.mustache deleted file mode 100644 index f3e3f22b3c4..00000000000 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/model.mustache +++ /dev/null @@ -1,12 +0,0 @@ -{{#jsonFormat}}import 'package:jaguar_serializer/jaguar_serializer.dart';{{/jsonFormat}} -{{#protoFormat}}syntax = "proto3";{{/protoFormat}} - -{{#models}} -{{#model}} -{{#imports}} -{{#jsonFormat}}import 'package:{{pubName}}/model/{{.}}.dart';{{/jsonFormat}} -{{#protoFormat}}import "{{.}}.proto";{{/protoFormat}} -{{/imports}} -{{#isEnum}}{{>enum}}{{/isEnum}}{{^isEnum}}{{>class}}{{/isEnum}} -{{/model}} -{{/models}} diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/model_test.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/model_test.mustache deleted file mode 100644 index 8e36f3df9a2..00000000000 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/model_test.mustache +++ /dev/null @@ -1,26 +0,0 @@ -{{#models}} -{{#model}} -import 'package:{{pubName}}/api.dart'; -import 'package:test/test.dart'; - -// tests for {{classname}} -void main() { - var instance = new {{classname}}(); - - group('test {{classname}}', () { - {{#vars}} - {{#description}} - // {{{.}}} - {{/description}} - // {{{dataType}}} {{name}}{{#defaultValue}} (default value: {{{.}}}){{/defaultValue}} - test('to test the property `{{name}}`', () async { - // TODO - }); - - {{/vars}} - - }); - -} -{{/model}} -{{/models}} diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/object_doc.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/object_doc.mustache deleted file mode 100644 index ee17fcd0227..00000000000 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/object_doc.mustache +++ /dev/null @@ -1,16 +0,0 @@ -{{#models}}{{#model}}# {{pubName}}.model.{{classname}} - -## Load the model package -```dart -import 'package:{{pubName}}/api.dart'; -``` - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{datatype}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{datatype}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{.}}]{{/defaultValue}} -{{/vars}} - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - -{{/model}}{{/models}} diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/pubspec.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/pubspec.mustache deleted file mode 100644 index 2f33bb93d3f..00000000000 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/pubspec.mustache +++ /dev/null @@ -1,20 +0,0 @@ -name: {{pubName}} -version: {{pubVersion}} -description: {{pubDescription}} -environment: - sdk: ">=2.0.0 <3.0.0" -dependencies: - jaguar_retrofit: ^2.8.8 -{{#jsonFormat}} - jaguar_serializer: ^2.2.12 -{{/jsonFormat}} -{{#protoFormat}} - jaguar_serializer_protobuf: ^2.2.2 - jaguar_mimetype: ^1.0.1 -{{/protoFormat}} -dev_dependencies: - jaguar_retrofit_gen: ^2.8.10 -{{#jsonFormat}} - jaguar_serializer_cli: ^2.2.8 -{{/jsonFormat}} - build_runner: ^1.6.5 diff --git a/modules/openapi-generator/src/main/resources/dart-jaguar/travis.mustache b/modules/openapi-generator/src/main/resources/dart-jaguar/travis.mustache deleted file mode 100644 index 82b19541fa4..00000000000 --- a/modules/openapi-generator/src/main/resources/dart-jaguar/travis.mustache +++ /dev/null @@ -1,11 +0,0 @@ -# https://docs.travis-ci.com/user/languages/dart/ -# -language: dart -dart: -# Install a specific stable release -- "1.24.3" -install: -- pub get - -script: -- pub run test