diff --git a/DataInputt/DataInputt.Tests/DataInputt.Tests.csproj b/DataInputt/DataInputt.Tests/DataInputt.Tests.csproj index 602c53a..0b30921 100644 --- a/DataInputt/DataInputt.Tests/DataInputt.Tests.csproj +++ b/DataInputt/DataInputt.Tests/DataInputt.Tests.csproj @@ -1,6 +1,5 @@  - Debug AnyCPU @@ -9,7 +8,7 @@ Properties DataInputt.Tests DataInputt.Tests - v4.6.1 + v4.7.2 512 {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 15.0 @@ -19,6 +18,7 @@ UnitTest + true @@ -38,40 +38,21 @@ 4 - - ..\packages\MSTest.TestFramework.1.2.0\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll - - - ..\packages\MSTest.TestFramework.1.2.0\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll - - - - - - - - - - {5E84912A-4948-49FE-BFFF-465A7FDC2C1C} - DataInputt - + + 1.2.0 + + + 1.2.0 + - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - \ No newline at end of file diff --git a/DataInputt/DataInputt.ZeitService.Api/DataInputt.ZeitService.Api.csproj b/DataInputt/DataInputt.ZeitService.Api/DataInputt.ZeitService.Api.csproj new file mode 100644 index 0000000..bfae2d4 --- /dev/null +++ b/DataInputt/DataInputt.ZeitService.Api/DataInputt.ZeitService.Api.csproj @@ -0,0 +1,11 @@ + + + + netstandard2.0 + + + + + + + diff --git a/DataInputt/DataInputt.ZeitService.Api/NSwagStudioGeneratorConfig.nswag b/DataInputt/DataInputt.ZeitService.Api/NSwagStudioGeneratorConfig.nswag new file mode 100644 index 0000000..ff11f5e --- /dev/null +++ b/DataInputt/DataInputt.ZeitService.Api/NSwagStudioGeneratorConfig.nswag @@ -0,0 +1,98 @@ +{ + "runtime": "NetCore31", + "defaultVariables": null, + "documentGenerator": { + "fromDocument": { + "json": "{\r\n \"x-generator\": \"NSwag v13.7.1.0 (NJsonSchema v10.1.26.0 (Newtonsoft.Json v10.0.0.0))\",\r\n \"swagger\": \"2.0\",\r\n \"info\": {\r\n \"title\": \"My Title\",\r\n \"version\": \"1.0.0\"\r\n },\r\n \"host\": \"localhost:52841\",\r\n \"schemes\": [\r\n \"http\"\r\n ],\r\n \"paths\": {\r\n \"/api/zeitservice/CreateUser\": {\r\n \"post\": {\r\n \"tags\": [\r\n \"ZeitService\"\r\n ],\r\n \"operationId\": \"ZeitService_CreateUser\",\r\n \"consumes\": [\r\n \"application/json\",\r\n \"text/json\",\r\n \"application/*+json\"\r\n ],\r\n \"produces\": [\r\n \"text/plain\",\r\n \"application/json\",\r\n \"text/json\"\r\n ],\r\n \"parameters\": [\r\n {\r\n \"name\": \"user\",\r\n \"in\": \"body\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"$ref\": \"#/definitions/User\"\r\n },\r\n \"x-nullable\": false\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"x-nullable\": false,\r\n \"description\": \"\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"/api/zeitservice/Login\": {\r\n \"post\": {\r\n \"tags\": [\r\n \"ZeitService\"\r\n ],\r\n \"operationId\": \"ZeitService_Login\",\r\n \"consumes\": [\r\n \"application/json\",\r\n \"text/json\",\r\n \"application/*+json\"\r\n ],\r\n \"produces\": [\r\n \"text/plain\",\r\n \"application/json\",\r\n \"text/json\"\r\n ],\r\n \"parameters\": [\r\n {\r\n \"name\": \"user\",\r\n \"in\": \"body\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"$ref\": \"#/definitions/User\"\r\n },\r\n \"x-nullable\": false\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"x-nullable\": false,\r\n \"description\": \"\",\r\n \"schema\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"/api/zeitservice/Times\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"ZeitService\"\r\n ],\r\n \"operationId\": \"ZeitService_GetTimes\",\r\n \"produces\": [\r\n \"text/plain\",\r\n \"application/json\",\r\n \"text/json\"\r\n ],\r\n \"parameters\": [\r\n {\r\n \"type\": \"integer\",\r\n \"name\": \"userId\",\r\n \"in\": \"query\",\r\n \"format\": \"int32\",\r\n \"x-nullable\": false\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"x-nullable\": false,\r\n \"description\": \"\",\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"$ref\": \"#/definitions/Time\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"/api/zeitservice/AddTime\": {\r\n \"post\": {\r\n \"tags\": [\r\n \"ZeitService\"\r\n ],\r\n \"operationId\": \"ZeitService_AddTime\",\r\n \"consumes\": [\r\n \"application/json\",\r\n \"text/json\",\r\n \"application/*+json\"\r\n ],\r\n \"parameters\": [\r\n {\r\n \"name\": \"time\",\r\n \"in\": \"body\",\r\n \"required\": true,\r\n \"schema\": {\r\n \"$ref\": \"#/definitions/Time\"\r\n },\r\n \"x-nullable\": false\r\n },\r\n {\r\n \"type\": \"integer\",\r\n \"name\": \"userId\",\r\n \"in\": \"query\",\r\n \"format\": \"int32\",\r\n \"x-nullable\": false\r\n }\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"description\": \"\"\r\n }\r\n }\r\n }\r\n },\r\n \"/api/zeitservice/Projects\": {\r\n \"get\": {\r\n \"tags\": [\r\n \"ZeitService\"\r\n ],\r\n \"operationId\": \"ZeitService_Projects\",\r\n \"produces\": [\r\n \"text/plain\",\r\n \"application/json\",\r\n \"text/json\"\r\n ],\r\n \"responses\": {\r\n \"200\": {\r\n \"x-nullable\": false,\r\n \"description\": \"\",\r\n \"schema\": {\r\n \"type\": \"array\",\r\n \"items\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"definitions\": {\r\n \"User\": {\r\n \"type\": \"object\",\r\n \"properties\": {\r\n \"name\": {\r\n \"type\": \"string\"\r\n },\r\n \"passwort\": {\r\n \"type\": \"string\"\r\n }\r\n }\r\n },\r\n \"Time\": {\r\n \"type\": \"object\",\r\n \"required\": [\r\n \"start\",\r\n \"end\",\r\n \"uId\",\r\n \"id\"\r\n ],\r\n \"properties\": {\r\n \"start\": {\r\n \"type\": \"string\",\r\n \"format\": \"date-time\"\r\n },\r\n \"end\": {\r\n \"type\": \"string\",\r\n \"format\": \"date-time\"\r\n },\r\n \"project\": {\r\n \"type\": \"string\"\r\n },\r\n \"uId\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\"\r\n },\r\n \"id\": {\r\n \"type\": \"integer\",\r\n \"format\": \"int32\"\r\n }\r\n }\r\n }\r\n }\r\n}", + "url": "http://localhost:52841/swagger/v1/swagger.json", + "output": null, + "newLineBehavior": "Auto" + } + }, + "codeGenerators": { + "openApiToCSharpClient": { + "clientBaseClass": null, + "configurationClass": null, + "generateClientClasses": true, + "generateClientInterfaces": true, + "clientBaseInterface": null, + "injectHttpClient": false, + "disposeHttpClient": false, + "protectedMethods": [], + "generateExceptionClasses": true, + "exceptionClass": "ZeitServiceApiException", + "wrapDtoExceptions": true, + "useHttpClientCreationMethod": false, + "httpClientType": "System.Net.Http.HttpClient", + "useHttpRequestMessageCreationMethod": false, + "useBaseUrl": true, + "generateBaseUrlProperty": true, + "generateSyncMethods": true, + "exposeJsonSerializerSettings": false, + "clientClassAccessModifier": "public", + "typeAccessModifier": "public", + "generateContractsOutput": false, + "contractsNamespace": "DataInputt.ZeitService.Api", + "contractsOutputFilePath": null, + "parameterDateTimeFormat": "s", + "parameterDateFormat": "yyyy-MM-dd", + "generateUpdateJsonSerializerSettingsMethod": true, + "useRequestAndResponseSerializationSettings": false, + "serializeTypeInformation": false, + "queryNullValue": "", + "className": "{controller}Client", + "operationGenerationMode": "MultipleClientsFromOperationId", + "additionalNamespaceUsages": [], + "additionalContractNamespaceUsages": [], + "generateOptionalParameters": false, + "generateJsonMethods": false, + "enforceFlagEnums": false, + "parameterArrayType": "System.Collections.Generic.IEnumerable", + "parameterDictionaryType": "System.Collections.Generic.IDictionary", + "responseArrayType": "System.Collections.Generic.List", + "responseDictionaryType": "System.Collections.Generic.IDictionary", + "wrapResponses": false, + "wrapResponseMethods": [], + "generateResponseClasses": true, + "responseClass": "SwaggerResponse", + "namespace": "DataInputt.ZeitService.Api", + "requiredPropertiesMustBeDefined": true, + "dateType": "System.DateTimeOffset", + "jsonConverters": null, + "anyType": "object", + "dateTimeType": "System.DateTimeOffset", + "timeType": "System.TimeSpan", + "timeSpanType": "System.TimeSpan", + "arrayType": "System.Collections.Generic.ICollection", + "arrayInstanceType": "System.Collections.ObjectModel.Collection", + "dictionaryType": "System.Collections.Generic.IDictionary", + "dictionaryInstanceType": "System.Collections.Generic.Dictionary", + "arrayBaseType": "System.Collections.ObjectModel.Collection", + "dictionaryBaseType": "System.Collections.Generic.Dictionary", + "classStyle": "Poco", + "generateDefaultValues": true, + "generateDataAnnotations": true, + "excludedTypeNames": [], + "excludedParameterNames": [], + "handleReferences": false, + "generateImmutableArrayProperties": false, + "generateImmutableDictionaryProperties": false, + "jsonSerializerSettingsTransformationMethod": null, + "inlineNamedArrays": false, + "inlineNamedDictionaries": false, + "inlineNamedTuples": true, + "inlineNamedAny": false, + "generateDtoTypes": false, + "generateOptionalPropertiesAsNullable": false, + "generateNullableReferenceTypes": false, + "templateDirectory": null, + "typeNameGeneratorType": null, + "propertyNameGeneratorType": null, + "enumNameGeneratorType": null, + "serviceHost": null, + "serviceSchemes": null, + "output": "ZeitServiceClient.cs", + "newLineBehavior": "Auto" + } + } +} \ No newline at end of file diff --git a/DataInputt/DataInputt.ZeitService.Api/Time.cs b/DataInputt/DataInputt.ZeitService.Api/Time.cs new file mode 100644 index 0000000..3d592f9 --- /dev/null +++ b/DataInputt/DataInputt.ZeitService.Api/Time.cs @@ -0,0 +1,13 @@ +using System; + +namespace DataInputt.ZeitService.Api +{ + public class Time + { + public DateTime Start { get; set; } + public DateTime End { get; set; } + public string Project { get; set; } + public int uId { get; set; } + public int Id { get; set; } + } +} diff --git a/DataInputt/DataInputt.ZeitService.Api/User.cs b/DataInputt/DataInputt.ZeitService.Api/User.cs new file mode 100644 index 0000000..56db09b --- /dev/null +++ b/DataInputt/DataInputt.ZeitService.Api/User.cs @@ -0,0 +1,8 @@ +namespace DataInputt.ZeitService.Api +{ + public class User + { + public string Name { get; set; } + public string Passwort { get; set; } + } +} diff --git a/DataInputt/DataInputt.ZeitService.Api/ZeitServiceClient.cs b/DataInputt/DataInputt.ZeitService.Api/ZeitServiceClient.cs new file mode 100644 index 0000000..cfdd5fd --- /dev/null +++ b/DataInputt/DataInputt.ZeitService.Api/ZeitServiceClient.cs @@ -0,0 +1,650 @@ +//---------------------- +// +// Generated using the NSwag toolchain v13.7.2.0 (NJsonSchema v10.1.26.0 (Newtonsoft.Json v12.0.0.0)) (http://NSwag.org) +// +//---------------------- + +#pragma warning disable 108 // Disable "CS0108 '{derivedDto}.ToJson()' hides inherited member '{dtoBase}.ToJson()'. Use the new keyword if hiding was intended." +#pragma warning disable 114 // Disable "CS0114 '{derivedDto}.RaisePropertyChanged(String)' hides inherited member 'dtoBase.RaisePropertyChanged(String)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword." +#pragma warning disable 472 // Disable "CS0472 The result of the expression is always 'false' since a value of type 'Int32' is never equal to 'null' of type 'Int32?' +#pragma warning disable 1573 // Disable "CS1573 Parameter '...' has no matching param tag in the XML comment for ... +#pragma warning disable 1591 // Disable "CS1591 Missing XML comment for publicly visible type or member ..." + +namespace DataInputt.ZeitService.Api +{ + using System = global::System; + + [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.7.2.0 (NJsonSchema v10.1.26.0 (Newtonsoft.Json v12.0.0.0))")] + public partial interface IZeitServiceClient + { + /// A server side error occurred. + System.Threading.Tasks.Task CreateUserAsync(User user); + + /// A server side error occurred. + int CreateUser(User user); + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// A server side error occurred. + System.Threading.Tasks.Task CreateUserAsync(User user, System.Threading.CancellationToken cancellationToken); + + /// A server side error occurred. + System.Threading.Tasks.Task LoginAsync(User user); + + /// A server side error occurred. + int Login(User user); + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// A server side error occurred. + System.Threading.Tasks.Task LoginAsync(User user, System.Threading.CancellationToken cancellationToken); + + /// A server side error occurred. + System.Threading.Tasks.Task> GetTimesAsync(int? userId); + + /// A server side error occurred. + System.Collections.Generic.List