From a5351f7ec05c0470585d79f59d77f2fe23372fc5 Mon Sep 17 00:00:00 2001 From: Christian Loitsch Date: Tue, 12 Jul 2016 18:05:40 +0200 Subject: [PATCH] feat dart: add pubName to library name. Otherwise projects may not use different apis generated by swagger, because library names must be unique. --- modules/swagger-codegen/src/main/resources/dart/api.mustache | 2 +- .../src/main/resources/dart/api_exception.mustache | 2 +- .../swagger-codegen/src/main/resources/dart/api_helper.mustache | 2 +- modules/swagger-codegen/src/main/resources/dart/apilib.mustache | 2 +- modules/swagger-codegen/src/main/resources/dart/model.mustache | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/swagger-codegen/src/main/resources/dart/api.mustache b/modules/swagger-codegen/src/main/resources/dart/api.mustache index 477271c3a79..9fcd1391406 100644 --- a/modules/swagger-codegen/src/main/resources/dart/api.mustache +++ b/modules/swagger-codegen/src/main/resources/dart/api.mustache @@ -1,4 +1,4 @@ -part of api; +part of {{pubName}}.api; {{#operations}} diff --git a/modules/swagger-codegen/src/main/resources/dart/api_exception.mustache b/modules/swagger-codegen/src/main/resources/dart/api_exception.mustache index c168fb512da..b0130dc61f5 100644 --- a/modules/swagger-codegen/src/main/resources/dart/api_exception.mustache +++ b/modules/swagger-codegen/src/main/resources/dart/api_exception.mustache @@ -1,4 +1,4 @@ -part of api; +part of {{pubName}}.api; class ApiException implements Exception { int code = 0; diff --git a/modules/swagger-codegen/src/main/resources/dart/api_helper.mustache b/modules/swagger-codegen/src/main/resources/dart/api_helper.mustache index fb25306d260..9e2c30228a8 100644 --- a/modules/swagger-codegen/src/main/resources/dart/api_helper.mustache +++ b/modules/swagger-codegen/src/main/resources/dart/api_helper.mustache @@ -1,4 +1,4 @@ -part of api; +part of {{pubName}}.api; const _delimiters = const {'csv': ',', 'ssv': ' ', 'tsv': '\t', 'pipes': '|'}; diff --git a/modules/swagger-codegen/src/main/resources/dart/apilib.mustache b/modules/swagger-codegen/src/main/resources/dart/apilib.mustache index 5d2f345703c..2ff574432f7 100644 --- a/modules/swagger-codegen/src/main/resources/dart/apilib.mustache +++ b/modules/swagger-codegen/src/main/resources/dart/apilib.mustache @@ -1,4 +1,4 @@ -library api; +library {{pubName}}.api; import 'dart:async'; import 'dart:convert';{{#browserClient}} diff --git a/modules/swagger-codegen/src/main/resources/dart/model.mustache b/modules/swagger-codegen/src/main/resources/dart/model.mustache index afd72265646..5fe107c7849 100644 --- a/modules/swagger-codegen/src/main/resources/dart/model.mustache +++ b/modules/swagger-codegen/src/main/resources/dart/model.mustache @@ -1,4 +1,4 @@ -part of api; +part of {{pubName}}.api; {{#models}}{{#model}} @Entity()