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 @@ -210,6 +210,7 @@ public void processOpts() {
// {{sourceFolder}}
if (additionalProperties.containsKey(CodegenConstants.SOURCE_FOLDER)) {
setSourceFolder((String) additionalProperties.get(CodegenConstants.SOURCE_FOLDER));
this.testFolder = ((String) additionalProperties.get(CodegenConstants.SOURCE_FOLDER));
} else {
additionalProperties.put(CodegenConstants.SOURCE_FOLDER, this.sourceFolder);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ build.bat
## Run in Docker

```
cd src/{{packageName}}
cd {{sourceFolder}}/{{packageName}}
docker build -t {{dockerTag}} .
docker run -p 5000:5000 {{dockerTag}}
```
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@echo off

dotnet restore src\{{packageName}}
dotnet build src\{{packageName}}
echo Now, run the following to start the project: dotnet run -p src\{{packageName}}\{{packageName}}.csproj --launch-profile web.
dotnet restore {{sourceFolder}}\{{packageName}}
dotnet build {{sourceFolder}}\{{packageName}}
echo Now, run the following to start the project: dotnet run -p {{sourceFolder}}\{{packageName}}\{{packageName}}.csproj --launch-profile web.
echo.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
# Generated by: https://github.com/swagger-api/swagger-codegen.git
#

dotnet restore src/{{packageName}}/ && \
dotnet build src/{{packageName}}/ && \
echo "Now, run the following to start the project: dotnet run -p src/{{packageName}}/{{packageName}}.csproj --launch-profile web"
dotnet restore {{sourceFolder}}/{{packageName}}/ && \
dotnet build {{sourceFolder}}/{{packageName}}/ && \
echo "Now, run the following to start the project: dotnet run -p {{sourceFolder}}/{{packageName}}/{{packageName}}.csproj --launch-profile web"
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ vendor/RestSharp.Net2.1.1.11/lib/net20/RestSharp.Net2.dll,\
System.Runtime.Serialization.dll \
-target:library \
-out:bin/{{packageName}}.dll \
-recurse:'src/*.cs' \
-recurse:'{{sourceFolder}}/*.cs' \
-doc:bin/{{packageName}}.xml \
-platform:anycpu
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio {{^netStandard}}2012{{/netStandard}}{{#netStandard}}14{{/netStandard}}
VisualStudioVersion = {{^netStandard}}12.0.0.0{{/netStandard}}{{#netStandard}}14.0.25420.1{{/netStandard}}
MinimumVisualStudioVersion = {{^netStandard}}10.0.0.1{{/netStandard}}{{#netStandard}}10.0.40219.1{{/netStandard}}
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "{{packageName}}", "src\{{packageName}}\{{packageName}}.csproj", "{{packageGuid}}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "{{packageName}}", "{{sourceFolder}}\{{packageName}}\{{packageName}}.csproj", "{{packageGuid}}"
EndProject
{{^excludeTests}}Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "{{testPackageName}}", "src\{{testPackageName}}\{{testPackageName}}.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}"
{{^excludeTests}}Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "{{testPackageName}}", "{{sourceFolder}}\{{testPackageName}}\{{testPackageName}}.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}"
EndProject
{{/excludeTests}}Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ if ! type nuget &>/dev/null; then
fi

mozroots --import --sync
${nuget_cmd} install src/{{packageName}}/packages.config -o packages;
${nuget_cmd} install {{sourceFolder}}/{{packageName}}/packages.config -o packages;

echo "[INFO] Copy DLLs to the 'bin' folder"
mkdir -p bin;
Expand All @@ -65,7 +65,7 @@ System.ComponentModel.DataAnnotations.dll,\
System.Runtime.Serialization.dll \
-target:library \
-out:bin/{{packageName}}.dll \
-recurse:'src/{{packageName}}/*.cs' \
-recurse:'{{sourceFolder}}/{{packageName}}/*.cs' \
-doc:bin/{{packageName}}.xml \
-platform:anycpu

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ SET CSCPATH=%SYSTEMROOT%\Microsoft.NET\Framework\v3.5
{{/supportsAsync}}

if not exist ".\nuget.exe" powershell -Command "(new-object System.Net.WebClient).DownloadFile('https://dist.nuget.org/win-x86-commandline/latest/nuget.exe', '.\nuget.exe')"
.\nuget.exe install src\{{packageName}}\packages.config -o packages
.\nuget.exe install {{sourceFolder}}\{{packageName}}\packages.config -o packages

if not exist ".\bin" mkdir bin

Expand All @@ -23,5 +23,5 @@ copy packages\Fody.1.29.4\Fody.dll bin\Fody.dll
copy packages\PropertyChanged.Fody.1.51.3\PropertyChanged.Fody.dll bin\PropertyChanged.Fody.dll
copy packages\PropertyChanged.Fody.1.51.3\Lib\dotnet\PropertyChanged.dll bin\PropertyChanged.dll
{{/generatePropertyChanged}}
%CSCPATH%\csc /reference:bin\Newtonsoft.Json.dll;bin\JsonSubTypes.dll;bin\RestSharp.dll;System.ComponentModel.DataAnnotations.dll {{#generatePropertyChanged}}/r:bin\Fody.dll;bin\PropertyChanged.Fody.dll;bin\PropertyChanged.dll{{/generatePropertyChanged}} /target:library /out:bin\{{packageName}}.dll /recurse:src\{{packageName}}\*.cs /doc:bin\{{packageName}}.xml
%CSCPATH%\csc /reference:bin\Newtonsoft.Json.dll;bin\JsonSubTypes.dll;bin\RestSharp.dll;System.ComponentModel.DataAnnotations.dll {{#generatePropertyChanged}}/r:bin\Fody.dll;bin\PropertyChanged.Fody.dll;bin\PropertyChanged.dll{{/generatePropertyChanged}} /target:library /out:bin\{{packageName}}.dll /recurse:{{sourceFolder}}\{{packageName}}\*.cs /doc:bin\{{packageName}}.xml

Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ wget -nc https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
mozroots --import --sync

echo "[INFO] remove bin/Debug/SwaggerClientTest.dll"
rm src/{{{packageName}}}.Test/bin/Debug/{{{packageName}}}.Test.dll 2> /dev/null
rm {{sourceFolder}}/{{{packageName}}}.Test/bin/Debug/{{{packageName}}}.Test.dll 2> /dev/null

echo "[INFO] install NUnit runners via NuGet"
wget -nc https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
mozroots --import --sync
mono nuget.exe install src/{{{packageName}}}.Test/packages.config -o packages
mono nuget.exe install {{sourceFolder}}/{{{packageName}}}.Test/packages.config -o packages

echo "[INFO] Install NUnit runners via NuGet"
mono nuget.exe install NUnit.Runners -Version 2.6.4 -OutputDirectory packages

echo "[INFO] Build the solution and run the unit test"
xbuild {{{packageName}}}.sln && \
mono ./packages/NUnit.Runners.2.6.4/tools/nunit-console.exe src/{{{packageName}}}.Test/bin/Debug/{{{packageName}}}.Test.dll
mono ./packages/NUnit.Runners.2.6.4/tools/nunit-console.exe {{sourceFolder}}/{{{packageName}}}.Test/bin/Debug/{{{packageName}}}.Test.dll
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,13 @@ public void testSettersForConfigValues() throws Exception {
public void testAdditionalPropertiesPutForConfigValues() throws Exception {
final CSharpClientCodegen codegen = new CSharpClientCodegen();
codegen.additionalProperties().put(CodegenConstants.HIDE_GENERATION_TIMESTAMP, false);
final String sourceFolder = "newSourceFolder/";
codegen.additionalProperties().put(CodegenConstants.SOURCE_FOLDER, sourceFolder);

codegen.processOpts();

Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.HIDE_GENERATION_TIMESTAMP), Boolean.FALSE);
Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.SOURCE_FOLDER), sourceFolder);
Assert.assertEquals(codegen.isHideGenerationTimestamp(), false);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.4.0-SNAPSHOT
2.4.46-SNAPSHOT
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.4.19-SNAPSHOT
2.4.46-SNAPSHOT
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.4.19-SNAPSHOT
2.4.46-SNAPSHOT
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.4.19-SNAPSHOT
2.4.46-SNAPSHOT
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.4.3-SNAPSHOT
2.4.46-SNAPSHOT
Original file line number Diff line number Diff line change
Expand Up @@ -118,35 +118,35 @@ Class | Method | HTTP request | Description
- [Model.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
- [Model.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
- [Model.ArrayTest](docs/ArrayTest.md)
- [Model.Boolean](docs/Boolean.md)
- [Model.Capitalization](docs/Capitalization.md)
- [Model.Cat](docs/Cat.md)
- [Model.Category](docs/Category.md)
- [Model.ClassModel](docs/ClassModel.md)
- [Model.Dog](docs/Dog.md)
- [Model.EnumArrays](docs/EnumArrays.md)
- [Model.EnumClass](docs/EnumClass.md)
- [Model.EnumTest](docs/EnumTest.md)
- [Model.FormatTest](docs/FormatTest.md)
- [Model.HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
- [Model.Ints](docs/Ints.md)
- [Model.List](docs/List.md)
- [Model.MapTest](docs/MapTest.md)
- [Model.MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md)
- [Model.Model200Response](docs/Model200Response.md)
- [Model.ModelClient](docs/ModelClient.md)
- [Model.Name](docs/Name.md)
- [Model.NumberOnly](docs/NumberOnly.md)
- [Model.Numbers](docs/Numbers.md)
- [Model.Order](docs/Order.md)
- [Model.OuterBoolean](docs/OuterBoolean.md)
- [Model.OuterComposite](docs/OuterComposite.md)
- [Model.OuterEnum](docs/OuterEnum.md)
- [Model.OuterNumber](docs/OuterNumber.md)
- [Model.OuterString](docs/OuterString.md)
- [Model.Pet](docs/Pet.md)
- [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md)
- [Model.Return](docs/Return.md)
- [Model.SpecialModelName](docs/SpecialModelName.md)
- [Model.Tag](docs/Tag.md)
- [Model.User](docs/User.md)
- [Model.Cat](docs/Cat.md)
- [Model.Dog](docs/Dog.md)


<a name="documentation-for-authorization"></a>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# IO.Swagger.Model.Boolean
## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------

[[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
Expand Up @@ -18,7 +18,7 @@ Method | HTTP request | Description

<a name="fakeouterbooleanserialize"></a>
# **FakeOuterBooleanSerialize**
> OuterBoolean FakeOuterBooleanSerialize (OuterBoolean body = null)
> bool? FakeOuterBooleanSerialize (bool? body = null)



Expand All @@ -39,11 +39,11 @@ namespace Example
public void main()
{
var apiInstance = new FakeApi();
var body = new OuterBoolean(); // OuterBoolean | Input boolean as post body (optional)
var body = new bool?(); // bool? | Input boolean as post body (optional)

try
{
OuterBoolean result = apiInstance.FakeOuterBooleanSerialize(body);
bool? result = apiInstance.FakeOuterBooleanSerialize(body);
Debug.WriteLine(result);
}
catch (Exception e)
Expand All @@ -59,11 +59,11 @@ namespace Example

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**OuterBoolean**](OuterBoolean.md)| Input boolean as post body | [optional]
**body** | [**bool?**](bool?.md)| Input boolean as post body | [optional]

### Return type

[**OuterBoolean**](OuterBoolean.md)
**bool?**

### Authorization

Expand Down Expand Up @@ -138,7 +138,7 @@ No authorization required

<a name="fakeouternumberserialize"></a>
# **FakeOuterNumberSerialize**
> OuterNumber FakeOuterNumberSerialize (OuterNumber body = null)
> decimal? FakeOuterNumberSerialize (decimal? body = null)



Expand All @@ -159,11 +159,11 @@ namespace Example
public void main()
{
var apiInstance = new FakeApi();
var body = new OuterNumber(); // OuterNumber | Input number as post body (optional)
var body = new decimal?(); // decimal? | Input number as post body (optional)

try
{
OuterNumber result = apiInstance.FakeOuterNumberSerialize(body);
decimal? result = apiInstance.FakeOuterNumberSerialize(body);
Debug.WriteLine(result);
}
catch (Exception e)
Expand All @@ -179,11 +179,11 @@ namespace Example

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**OuterNumber**](OuterNumber.md)| Input number as post body | [optional]
**body** | [**decimal?**](decimal?.md)| Input number as post body | [optional]

### Return type

[**OuterNumber**](OuterNumber.md)
**decimal?**

### Authorization

Expand All @@ -198,7 +198,7 @@ No authorization required

<a name="fakeouterstringserialize"></a>
# **FakeOuterStringSerialize**
> OuterString FakeOuterStringSerialize (OuterString body = null)
> string FakeOuterStringSerialize (string body = null)



Expand All @@ -219,11 +219,11 @@ namespace Example
public void main()
{
var apiInstance = new FakeApi();
var body = new OuterString(); // OuterString | Input string as post body (optional)
var body = new string(); // string | Input string as post body (optional)

try
{
OuterString result = apiInstance.FakeOuterStringSerialize(body);
string result = apiInstance.FakeOuterStringSerialize(body);
Debug.WriteLine(result);
}
catch (Exception e)
Expand All @@ -239,11 +239,11 @@ namespace Example

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**OuterString**](OuterString.md)| Input string as post body | [optional]
**body** | [**string**](string.md)| Input string as post body | [optional]

### Return type

[**OuterString**](OuterString.md)
**string**

### Authorization

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# IO.Swagger.Model.Ints
## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------

[[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,8 @@
# IO.Swagger.Model.Numbers
## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------

[[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
Expand Up @@ -3,9 +3,9 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**MyNumber** | [**OuterNumber**](OuterNumber.md) | | [optional]
**MyString** | [**OuterString**](OuterString.md) | | [optional]
**MyBoolean** | [**OuterBoolean**](OuterBoolean.md) | | [optional]
**MyNumber** | **decimal?** | | [optional]
**MyString** | **string** | | [optional]
**MyBoolean** | **bool?** | | [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
Expand Up @@ -460,7 +460,7 @@ void (empty response body)

<a name="uploadfile"></a>
# **UploadFile**
> ApiResponse UploadFile (long? petId, string additionalMetadata = null, System.IO.Stream file = null)
> ApiResponse UploadFile (long? petId, string additionalMetadata = null, System.IO.Stream _file = null)

uploads an image

Expand All @@ -484,12 +484,12 @@ namespace Example
var apiInstance = new PetApi();
var petId = 789; // long? | ID of pet to update
var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional)
var file = new System.IO.Stream(); // System.IO.Stream | file to upload (optional)
var _file = new System.IO.Stream(); // System.IO.Stream | file to upload (optional)

try
{
// uploads an image
ApiResponse result = apiInstance.UploadFile(petId, additionalMetadata, file);
ApiResponse result = apiInstance.UploadFile(petId, additionalMetadata, _file);
Debug.WriteLine(result);
}
catch (Exception e)
Expand All @@ -507,7 +507,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**petId** | **long?**| ID of pet to update |
**additionalMetadata** | **string**| Additional data to pass to server | [optional]
**file** | **System.IO.Stream**| file to upload | [optional]
**_file** | **System.IO.Stream**| file to upload | [optional]

### Return type

Expand Down
Loading
Loading