diff --git a/README.md b/README.md
index adf3fa9c405..c624cc075b4 100644
--- a/README.md
+++ b/README.md
@@ -62,7 +62,7 @@ OpenAPI Generator allows generation of API client libraries (SDK generation), se
| | Languages/Frameworks |
| -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later, .NET Standard 1.3 - 2.1, .NET Core 3.1, .NET 5.0. Libraries: RestSharp, GenericHost, HttpClient), **C++** (Arduino, cpp-restsdk, Qt5, Tizen, Unreal Engine 4), **Clojure**, **Crystal**, **Dart**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Apache HttpClient, Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client, MicroProfile Rest Client), **k6**, **Kotlin**, **Lua**, **Nim**, **Node.js/JavaScript** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types, Apollo GraphQL DataStore), **Objective-C**, **OCaml**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (hyper, reqwest, rust-server), **Scala** (akka, http4s, scalaz, sttp, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x, 5.x), **Typescript** (AngularJS, Angular (2.x - 11.x), Aurelia, Axios, Fetch, Inversify, jQuery, Nestjs, Node, redux-query, Rxjs) |
-| **Server stubs** | **Ada**, **C#** (ASP.NET Core, NancyFx, Azure Functions), **C++** (Pistache, Restbed, Qt5 QHTTPEngine), **Erlang**, **F#** (Giraffe), **Go** (net/http, Gin, Echo), **Haskell** (Servant, Yesod), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, Jersey, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples), [Vert.x](https://vertx.io/), [Apache Camel](https://camel.apache.org/)), **Kotlin** (Spring Boot, Ktor, Vertx), **PHP** (Laravel, Lumen, [Mezzio (fka Zend Expressive)](https://github.com/mezzio/mezzio), Slim, Silex, [Symfony](https://symfony.com/)), **Python** (FastAPI, Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** (rust-server), **Scala** (Akka, [Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), [Play](https://www.playframework.com/), Scalatra) |
+| **Server stubs** | **Ada**, **C#** (ASP.NET Core, Azure Functions), **C++** (Pistache, Restbed, Qt5 QHTTPEngine), **Erlang**, **F#** (Giraffe), **Go** (net/http, Gin, Echo), **Haskell** (Servant, Yesod), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, Jersey, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples), [Vert.x](https://vertx.io/), [Apache Camel](https://camel.apache.org/)), **Kotlin** (Spring Boot, Ktor, Vertx), **PHP** (Laravel, Lumen, [Mezzio (fka Zend Expressive)](https://github.com/mezzio/mezzio), Slim, Silex, [Symfony](https://symfony.com/)), **Python** (FastAPI, Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** (rust-server), **Scala** (Akka, [Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), [Play](https://www.playframework.com/), Scalatra) |
| **API documentation generators** | **HTML**, **Confluence Wiki**, **Asciidoc**, **Markdown**, **PlantUML** |
| **Configuration files** | [**Apache2**](https://httpd.apache.org/) |
| **Others** | **GraphQL**, **JMeter**, **Ktorm**, **MySQL Schema**, **Protocol Buffer**, **WSDL** |
@@ -949,7 +949,6 @@ Here is a list of template creators:
* C# ASP.NET Core 3.0: @A-Joshi
* C# APS.NET Core 3.1: @phatcher
* C# Azure functions: @Abrhm7786
- * C# NancyFX: @mstefaniuk
* C++ (Qt5 QHttpEngine): @etherealjoy
* C++ Pistache: @sebymiano
* C++ Restbed: @stkrwork
diff --git a/docs/faq-generators.md b/docs/faq-generators.md
index 7f21a93860c..370130dbe11 100644
--- a/docs/faq-generators.md
+++ b/docs/faq-generators.md
@@ -5,7 +5,7 @@ title: "FAQ: Generators"
### What are some server generator use cases?
-We have around 40+ server generators, with more added regularly. Some of these include Spring in your choice of Java or Kotlin, the Finch and Scalatra frameworks using Scala, and C# generators for NancyFX and WebAPI (to name only a few).
+We have around 40+ server generators, with more added regularly. Some of these include Spring in your choice of Java or Kotlin, the Finch and Scalatra frameworks using Scala, and C# generators for ASP.NET and Azure Functions (to name only a few).
Besides generating the server code as a starting point to implement the API backend, here are some use cases of the server generators:
diff --git a/docs/generators.md b/docs/generators.md
index 595a9e804af..4dda7bc557f 100644
--- a/docs/generators.md
+++ b/docs/generators.md
@@ -82,7 +82,6 @@ The following generators are available:
* [cpp-pistache-server](generators/cpp-pistache-server.md)
* [cpp-qt-qhttpengine-server](generators/cpp-qt-qhttpengine-server.md)
* [cpp-restbed-server](generators/cpp-restbed-server.md)
-* [csharp-nancyfx-deprecated (deprecated)](generators/csharp-nancyfx-deprecated.md)
* [csharp-netcore-functions (beta)](generators/csharp-netcore-functions.md)
* [erlang-server](generators/erlang-server.md)
* [fsharp-functions (beta)](generators/fsharp-functions.md)
diff --git a/docs/generators/README.md b/docs/generators/README.md
index 8f6ee8a7f15..648de9673e7 100644
--- a/docs/generators/README.md
+++ b/docs/generators/README.md
@@ -67,7 +67,6 @@ The following generators are available:
* [cpp-pistache-server](cpp-pistache-server.md)
* [cpp-qt5-qhttpengine-server](cpp-qt5-qhttpengine-server.md)
* [cpp-restbed-server](cpp-restbed-server.md)
-* [csharp-nancyfx](csharp-nancyfx.md)
* [erlang-server](erlang-server.md)
* [fsharp-functions (beta)](fsharp-functions.md)
* [fsharp-giraffe-server (beta)](fsharp-giraffe-server.md)
diff --git a/docs/generators/csharp-nancyfx-deprecated.md b/docs/generators/csharp-nancyfx-deprecated.md
deleted file mode 100644
index 519edc27307..00000000000
--- a/docs/generators/csharp-nancyfx-deprecated.md
+++ /dev/null
@@ -1,209 +0,0 @@
----
-title: Documentation for the csharp-nancyfx-deprecated Generator
----
-
-## METADATA
-
-| Property | Value | Notes |
-| -------- | ----- | ----- |
-| generator name | csharp-nancyfx-deprecated | pass this to the generate command after -g |
-| generator stability | DEPRECATED | |
-| generator type | SERVER | |
-| generator language | C# | |
-| generator default templating engine | mustache | |
-| helpTxt | Generates a C# NancyFX Web API server (deprecated). | |
-
-## 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 |
-| ------ | ----------- | ------ | ------- |
-|asyncServer|Set to true to enable the generation of async routes/endpoints.| |false|
-|immutable|Enabled by default. If disabled generates model classes with setters| |true|
-|interfacePrefix|Prefix interfaces with a community standard or widely accepted prefix.| ||
-|optionalProjectFile|Generate {PackageName}.csproj.| |true|
-|packageContext|Optionally overrides the PackageContext which determines the namespace (namespace=packageName.packageContext). If not set, packageContext will default to basePath.| |null|
-|packageGuid|The GUID that will be associated with the C# project| |null|
-|packageName|C# package name (convention: Title.Case).| |Org.OpenAPITools|
-|packageVersion|C# package version.| |1.0.0|
-|returnICollection|Return ICollection<T> instead of the concrete type.| |false|
-|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
-|sourceFolder|source folder for generated code| |src|
-|useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false|
-|useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false|
-|writeModulePath|Enabled by default. If disabled, module paths will not mirror api base path| |true|
-
-## IMPORT MAPPING
-
-| Type/Alias | Imports |
-| ---------- | ------- |
-
-
-## INSTANTIATION TYPES
-
-| Type/Alias | Instantiated By |
-| ---------- | --------------- |
-|array|List|
-|list|List|
-|map|Dictionary|
-
-
-## LANGUAGE PRIMITIVES
-
-
-- Boolean
-- Collection
-- DateTime
-- DateTime?
-- DateTimeOffset
-- DateTimeOffset?
-- Decimal
-- Dictionary
-- Double
-- Float
-- Guid
-- Guid?
-- ICollection
-- Int32
-- Int64
-- List
-- LocalDate?
-- LocalTime?
-- Object
-- String
-- System.IO.Stream
-- ZonedDateTime?
-- bool
-- bool?
-- byte[]
-- decimal
-- decimal?
-- double
-- double?
-- float
-- float?
-- int
-- int?
-- long
-- long?
-- string
-
-
-## RESERVED WORDS
-
-
-- async
-- await
-- dynamic
-- var
-- yield
-
-
-## 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/migration-from-swagger-codegen.md b/docs/migration-from-swagger-codegen.md
index f4bd36b6d33..85232ebb91b 100644
--- a/docs/migration-from-swagger-codegen.md
+++ b/docs/migration-from-swagger-codegen.md
@@ -130,7 +130,6 @@ All languages of `swagger-codegen` have been migrated to `openapi-generator`, bu
| `lumen` | `php-lumen` |
| `slim` | `php-slim` |
| `ze-ph` | `php-mezzio-ph` |
-| `nancyfx` | `csharp-nancyfx` |
We provide a temporary mapping in code for these old values. You'll receive a warning with instructions to migrate to the new names.
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNancyFXServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNancyFXServerCodegen.java
deleted file mode 100644
index 280d26f7a16..00000000000
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNancyFXServerCodegen.java
+++ /dev/null
@@ -1,441 +0,0 @@
-/*
- * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech)
- * Copyright 2018 SmartBear Software
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.openapitools.codegen.languages;
-
-import com.google.common.base.Predicate;
-import com.google.common.collect.*;
-import io.swagger.v3.oas.models.OpenAPI;
-import io.swagger.v3.oas.models.media.Schema;
-import org.openapitools.codegen.*;
-import org.openapitools.codegen.meta.features.*;
-import org.openapitools.codegen.meta.GeneratorMetadata;
-import org.openapitools.codegen.meta.Stability;
-import org.openapitools.codegen.utils.ModelUtils;
-import org.openapitools.codegen.utils.URLPathUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.File;
-import java.net.URL;
-import java.util.*;
-import java.util.Map.Entry;
-
-import static com.google.common.base.Strings.isNullOrEmpty;
-import static java.util.Arrays.asList;
-import static java.util.UUID.randomUUID;
-import static org.apache.commons.lang3.StringUtils.capitalize;
-import static org.openapitools.codegen.CodegenConstants.*;
-import static org.openapitools.codegen.CodegenType.SERVER;
-import static org.openapitools.codegen.utils.StringUtils.camelize;
-
-public class CSharpNancyFXServerCodegen extends AbstractCSharpCodegen {
- private final Logger LOGGER = LoggerFactory.getLogger(CSharpNancyFXServerCodegen.class);
-
- private static final String API_NAMESPACE = "Modules";
- private static final String MODEL_NAMESPACE = "Models";
- private static final String IMMUTABLE_OPTION = "immutable";
- private static final String USE_BASE_PATH = "writeModulePath";
- private static final String PACKAGE_CONTEXT = "packageContext";
- private static final String ASYNC_SERVER = "asyncServer";
-
- private static final Map> propertyToOpenAPITypeMapping =
- createPropertyToOpenAPITypeMapping();
-
- private String packageGuid = "{" + randomUUID().toString().toUpperCase(Locale.ROOT) + "}";
-
- private final Map dependencies = new HashMap<>();
- private final Set parentModels = new HashSet<>();
- private final Multimap childrenByParent = ArrayListMultimap.create();
- private final BiMap modelNameMapping = HashBiMap.create();
-
- /**
- * If set to true, we will generate c# async endpoints and service interfaces
- */
- private boolean asyncServer = false;
-
- public CSharpNancyFXServerCodegen() {
- super();
-
- modifyFeatureSet(features -> features
- .excludeDocumentationFeatures(DocumentationFeature.Readme)
- .securityFeatures(EnumSet.noneOf(SecurityFeature.class))
- .excludeGlobalFeatures(
- GlobalFeature.XMLStructureDefinitions,
- GlobalFeature.Callbacks,
- GlobalFeature.LinkObjects,
- GlobalFeature.ParameterStyling
- )
- .includeSchemaSupportFeatures(
- SchemaSupportFeature.Polymorphism
- )
- .excludeParameterFeatures(
- ParameterFeature.Cookie
- )
- );
-
- generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata)
- .stability(Stability.DEPRECATED)
- .build();
-
- outputFolder = "generated-code" + File.separator + getName();
- apiTemplateFiles.put("api.mustache", ".cs");
-
- // Early versions use no prefix for interfaces. Defaulting to I- common practice would break existing users.
- setInterfacePrefix("");
-
- // contextually reserved words
- setReservedWordsLowerCase(
- asList("var", "async", "await", "dynamic", "yield")
- );
-
- cliOptions.clear();
-
- // CLI options
- addOption(PACKAGE_NAME, "C# package name (convention: Title.Case).", packageName);
- addOption(PACKAGE_VERSION, "C# package version.", packageVersion);
- addOption(SOURCE_FOLDER, SOURCE_FOLDER_DESC, sourceFolder);
- addOption(INTERFACE_PREFIX, INTERFACE_PREFIX_DESC, interfacePrefix);
- addOption(OPTIONAL_PROJECT_GUID, OPTIONAL_PROJECT_GUID_DESC, null);
- addOption(PACKAGE_CONTEXT, "Optionally overrides the PackageContext which determines the namespace (namespace=packageName.packageContext). If not set, packageContext will default to basePath.", null);
-
- // CLI Switches
- addSwitch(SORT_PARAMS_BY_REQUIRED_FLAG, SORT_PARAMS_BY_REQUIRED_FLAG_DESC, sortParamsByRequiredFlag);
- addSwitch(OPTIONAL_PROJECT_FILE, OPTIONAL_PROJECT_FILE_DESC, optionalProjectFileFlag);
- addSwitch(USE_DATETIME_OFFSET, USE_DATETIME_OFFSET_DESC, useDateTimeOffsetFlag);
- addSwitch(USE_COLLECTION, USE_COLLECTION_DESC, useCollection);
- addSwitch(RETURN_ICOLLECTION, RETURN_ICOLLECTION_DESC, returnICollection);
- addSwitch(IMMUTABLE_OPTION, "Enabled by default. If disabled generates model classes with setters", true);
- addSwitch(USE_BASE_PATH, "Enabled by default. If disabled, module paths will not mirror api base path", true);
- addSwitch(ASYNC_SERVER, "Set to true to enable the generation of async routes/endpoints.", this.asyncServer);
- typeMapping.putAll(nodaTimeTypesMappings());
- languageSpecificPrimitives.addAll(nodaTimePrimitiveTypes());
- }
-
- @Override
- public CodegenType getTag() {
- return SERVER;
- }
-
- @Override
- public String getName() {
- return "csharp-nancyfx-deprecated";
- }
-
- @Override
- public String getHelp() {
- return "Generates a C# NancyFX Web API server (deprecated).";
- }
-
- @Override
- public void processOpts() {
- super.processOpts();
-
- apiPackage = isNullOrEmpty(packageName) ? API_NAMESPACE : packageName + "." + API_NAMESPACE;
- modelPackage = isNullOrEmpty(packageName) ? MODEL_NAMESPACE : packageName + "." + MODEL_NAMESPACE;
-
- supportingFiles.add(new SupportingFile("gitignore", "", ".gitignore"));
- supportingFiles.add(new SupportingFile("parameters.mustache", sourceFile("Utils"), "Parameters.cs"));
- supportingFiles.add(new SupportingFile("localDateConverter.mustache", sourceFile("Utils"), "LocalDateConverter.cs"));
- supportingFiles.add(new SupportingFile("packages.config.mustache", sourceFolder(), "packages.config"));
- supportingFiles.add(new SupportingFile("nuspec.mustache", sourceFolder(), packageName + ".nuspec"));
-
- if (optionalProjectFileFlag) {
- supportingFiles.add(new SupportingFile("Solution.mustache", "", packageName + ".sln"));
- supportingFiles.add(new SupportingFile("Project.mustache", sourceFolder(), packageName + ".csproj"));
- }
-
- if (additionalProperties.containsKey(OPTIONAL_PROJECT_GUID)) {
- setPackageGuid((String) additionalProperties.get(OPTIONAL_PROJECT_GUID));
- }
-
- if (additionalProperties.containsKey(ASYNC_SERVER)) {
- setAsyncServer(convertPropertyToBooleanAndWriteBack(ASYNC_SERVER));
- } else {
- additionalProperties.put(ASYNC_SERVER, this.asyncServer);
- }
-
- additionalProperties.put("packageGuid", packageGuid);
-
- setupModelTemplate();
- processImportedMappings();
- appendDependencies();
- }
-
- private void setupModelTemplate() {
- final Object immutableOption = additionalProperties.get(IMMUTABLE_OPTION);
- if (immutableOption != null && "false".equalsIgnoreCase(immutableOption.toString())) {
- LOGGER.info("Using mutable model template");
- modelTemplateFiles.put("modelMutable.mustache", ".cs");
- } else {
- LOGGER.info("Using immutable model template");
- modelTemplateFiles.put("model.mustache", ".cs");
- }
- }
-
- private void processImportedMappings() {
- for (final Entry entry : ImmutableSet.copyOf(importMapping.entrySet())) {
- final String model = entry.getKey();
- final String[] namespaceInfo = entry.getValue().split("\\s");
- final String[] namespace = (namespaceInfo.length > 0 ? namespaceInfo[0].trim() : "").split(":");
- final String namespaceName = namespace.length > 0 ? namespace[0].trim() : null;
- final String modelClass = namespace.length > 1 ? namespace[1].trim() : null;
- final String assembly = namespaceInfo.length > 1 ? namespaceInfo[1].trim() : null;
- final String assemblyVersion = namespaceInfo.length > 2 ? namespaceInfo[2].trim() : null;
- final String assemblyFramework = namespaceInfo.length > 3 ? namespaceInfo[3].trim() : "net45";
-
- if (isNullOrEmpty(model) || isNullOrEmpty(namespaceName)) {
- LOGGER.warn(String.format(Locale.ROOT, "Could not import: '%s' - invalid namespace: '%s'", model, entry.getValue()));
- importMapping.remove(model);
- } else {
- LOGGER.info(String.format(Locale.ROOT, "Importing: '%s' from '%s' namespace.", model, namespaceName));
- importMapping.put(model, namespaceName);
- }
- if (!isNullOrEmpty(modelClass)) {
- LOGGER.info(String.format(Locale.ROOT, "Mapping: '%s' class to '%s'", model, modelClass));
- modelNameMapping.put(model, modelClass);
- }
- if (assembly != null && assemblyVersion != null) {
- LOGGER.info(String.format(Locale.ROOT, "Adding dependency: '%s', version: '%s', framework: '%s'",
- assembly, assemblyVersion, assemblyVersion));
- dependencies.put(assembly, new DependencyInfo(assemblyVersion, assemblyFramework));
- }
- }
- }
-
- private void appendDependencies() {
- final List