Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ private Model getParent(Model model) {
try {
//don't generate models that have an import mapping
if(config.importMapping().containsKey(name)) {
LOGGER.info("Model " + name + " not imported due to import mapping");
continue;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
public AbstractCSharpCodegen() {
super();

// C# does not use import mapping
importMapping.clear();

outputFolder = "generated-code" + File.separator + this.getName();
embeddedTemplateDir = templateDir = this.getName();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ public abstract class AbstractTypeScriptClientCodegen extends DefaultCodegen imp

public AbstractTypeScriptClientCodegen() {
super();

// clear import mapping (from default generator) as TS does not use it
// at the moment
importMapping.clear();

supportsInheritance = true;
setReservedWordsLowerCase(Arrays.asList(
// local variable names used in API methods (endpoints)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ public class CsharpDotNet2ClientCodegen extends DefaultCodegen implements Codege

public CsharpDotNet2ClientCodegen() {
super();

// clear import mapping (from default generator) as C# (2.0) does not use it
// at the moment
importMapping.clear();

outputFolder = "generated-code" + File.separator + "CsharpDotNet2";
modelTemplateFiles.put("model.mustache", ".cs");
apiTemplateFiles.put("api.mustache", ".cs");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ public class DartClientCodegen extends DefaultCodegen implements CodegenConfig {

public DartClientCodegen() {
super();

// clear import mapping (from default generator) as dart does not use it
// at the moment
importMapping.clear();

outputFolder = "generated-code/dart";
modelTemplateFiles.put("model.mustache", ".dart");
apiTemplateFiles.put("api.mustache", ".dart");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ public class GroovyClientCodegen extends AbstractJavaCodegen {
public GroovyClientCodegen() {
super();

// clear import mapping (from default generator) as groovy does not use it
// at the moment
importMapping.clear();

sourceFolder = projectFolder + File.separator + "groovy";
outputFolder = "generated-code/groovy";
modelTemplateFiles.put("model.mustache", ".groovy");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ public class PerlClientCodegen extends DefaultCodegen implements CodegenConfig {

public PerlClientCodegen() {
super();

// clear import mapping (from default generator) as perl does not use it
// at the moment
importMapping.clear();

modelPackage = File.separatorChar + "Object";
outputFolder = "generated-code" + File.separatorChar + "perl";
modelTemplateFiles.put("object.mustache", ".pm");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ public class PhpClientCodegen extends DefaultCodegen implements CodegenConfig {
public PhpClientCodegen() {
super();

// clear import mapping (from default generator) as php does not use it
// at the moment
importMapping.clear();


supportsInheritance = true;
outputFolder = "generated-code" + File.separator + "php";
modelTemplateFiles.put("model.mustache", ".php");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig
public PythonClientCodegen() {
super();

// clear import mapping (from default generator) as python does not use it
// at the moment
importMapping.clear();

modelPackage = "models";
apiPackage = "api";
outputFolder = "generated-code" + File.separatorChar + "python";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ public class RubyClientCodegen extends DefaultCodegen implements CodegenConfig {

public RubyClientCodegen() {
super();

// clear import mapping (from default generator) as ruby does not use it
// at the moment
importMapping.clear();

modelPackage = "models";
apiPackage = "api";
outputFolder = "generated-code" + File.separator + "ruby";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ public class SlimFrameworkServerCodegen extends DefaultCodegen implements Codege
public SlimFrameworkServerCodegen() {
super();

// clear import mapping (from default generator) as slim does not use it
// at the moment
importMapping.clear();

invokerPackage = camelize("SwaggerServer");

//String packagePath = "SwaggerServer";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ public class StaticDocCodegen extends DefaultCodegen implements CodegenConfig {

public StaticDocCodegen() {
super();

// clear import mapping (from default generator) as this generator does not use it
// at the moment
importMapping.clear();

outputFolder = "docs";
modelTemplateFiles.put("model.mustache", ".html");
apiTemplateFiles.put("operation.mustache", ".html");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege

public TypeScriptFetchClientCodegen() {
super();

// clear import mapping (from default generator) as TS does not use it
// at the moment
importMapping.clear();

outputFolder = "generated-code/typescript-fetch";
embeddedTemplateDir = templateDir = "TypeScript-Fetch";
this.cliOptions.add(new CliOption(NPM_NAME, "The name under which you want to publish generated npm package"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ public class TypeScriptNodeClientCodegen extends AbstractTypeScriptClientCodegen

public TypeScriptNodeClientCodegen() {
super();

// clear import mapping (from default generator) as TS does not use it
// at the moment
importMapping.clear();

outputFolder = "generated-code/typescript-node";
embeddedTemplateDir = templateDir = "typescript-node";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1040,6 +1040,11 @@ definitions:
type: object
additionalProperties:
$ref: '#/definitions/Animal'
List:
type: object
properties:
123-list:
type: string
Client:
type: object
properties:
Expand Down
10 changes: 5 additions & 5 deletions samples/client/petstore/csharp/SwaggerClient/IO.Swagger.sln
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
VisualStudioVersion = 12.0.0.0
MinimumVisualStudioVersion = 10.0.0.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{B7B26355-6F11-47C6-AB34-6237A673E486}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger", "src\IO.Swagger\IO.Swagger.csproj", "{C95ADC68-F3D8-41D1-BA8A-6C0754E6BB54}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IO.Swagger.Test", "src\IO.Swagger.Test\IO.Swagger.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}"
EndProject
Expand All @@ -12,10 +12,10 @@ Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B7B26355-6F11-47C6-AB34-6237A673E486}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B7B26355-6F11-47C6-AB34-6237A673E486}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B7B26355-6F11-47C6-AB34-6237A673E486}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B7B26355-6F11-47C6-AB34-6237A673E486}.Release|Any CPU.Build.0 = Release|Any CPU
{C95ADC68-F3D8-41D1-BA8A-6C0754E6BB54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C95ADC68-F3D8-41D1-BA8A-6C0754E6BB54}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C95ADC68-F3D8-41D1-BA8A-6C0754E6BB54}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C95ADC68-F3D8-41D1-BA8A-6C0754E6BB54}.Release|Any CPU.Build.0 = Release|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
3 changes: 2 additions & 1 deletion samples/client/petstore/csharp/SwaggerClient/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This C# SDK is automatically generated by the [Swagger Codegen](https://github.c

- API version: 1.0.0
- SDK version: 1.0.0
- Build date: 2016-07-26T00:22:48.731+08:00
- Build date: 2016-07-26T14:25:16.509+08:00
- Build package: class io.swagger.codegen.languages.CSharpClientCodegen

## Frameworks supported
Expand Down Expand Up @@ -120,6 +120,7 @@ Class | Method | HTTP request | Description
- [Model.EnumTest](docs/EnumTest.md)
- [Model.FormatTest](docs/FormatTest.md)
- [Model.HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
- [Model.List](docs/List.md)
- [Model.MapTest](docs/MapTest.md)
- [Model.MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md)
- [Model.Model200Response](docs/Model200Response.md)
Expand Down
9 changes: 9 additions & 0 deletions samples/client/petstore/csharp/SwaggerClient/docs/List.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# IO.Swagger.Model.List
## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**_123List** | **string** | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
/*
* Swagger Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*
* 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
*
* http://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.
*/


using NUnit.Framework;

using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
using IO.Swagger.Api;
using IO.Swagger.Model;
using IO.Swagger.Client;
using System.Reflection;

namespace IO.Swagger.Test
{
/// <summary>
/// Class for testing List
/// </summary>
/// <remarks>
/// This file is automatically generated by Swagger Codegen.
/// Please update the test case below to test the model.
/// </remarks>
[TestFixture]
public class ListTests
{
// TODO uncomment below to declare an instance variable for List
//private List instance;

/// <summary>
/// Setup before each test
/// </summary>
[SetUp]
public void Init()
{
// TODO uncomment below to create an instance of List
//instance = new List();
}

/// <summary>
/// Clean up after each test
/// </summary>
[TearDown]
public void Cleanup()
{

}

/// <summary>
/// Test an instance of List
/// </summary>
[Test]
public void ListInstanceTest()
{
// TODO uncomment below to test "IsInstanceOfType" List
//Assert.IsInstanceOfType<List> (instance, "variable 'instance' is a List");
}

/// <summary>
/// Test the property '_123List'
/// </summary>
[Test]
public void _123ListTest()
{
// TODO unit test for the property '_123List'
}

}

}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ limitations under the License.
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{B7B26355-6F11-47C6-AB34-6237A673E486}</ProjectGuid>
<ProjectGuid>{C95ADC68-F3D8-41D1-BA8A-6C0754E6BB54}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>IO.Swagger</RootNamespace>
Expand Down
Loading