Fix swagme method POST

This commit is contained in:
Mike Nolan 2023-01-20 20:01:51 -06:00
parent 51d96a9659
commit 9a7bb1160d
47 changed files with 119 additions and 195 deletions

View File

@ -1,97 +0,0 @@
{
"runtimeTarget": {
"name": ".NETStandard,Version=v2.0/",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETStandard,Version=v2.0": {},
".NETStandard,Version=v2.0/": {
"Tesses.WebServer.EasyServer/1.0.0": {
"dependencies": {
"NETStandard.Library": "2.0.3",
"Tesses.WebServer": "1.0.3.8"
},
"runtime": {
"Tesses.WebServer.EasyServer.dll": {}
}
},
"Microsoft.NETCore.Platforms/1.1.0": {},
"MimeTypesMap/1.0.8": {
"runtime": {
"lib/netstandard2.0/MimeTypesMap.dll": {
"assemblyVersion": "1.0.8.0",
"fileVersion": "1.0.8.0"
}
}
},
"NETStandard.Library/2.0.3": {
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0"
}
},
"Newtonsoft.Json/13.0.1": {
"runtime": {
"lib/netstandard2.0/Newtonsoft.Json.dll": {
"assemblyVersion": "13.0.0.0",
"fileVersion": "13.0.1.25517"
}
}
},
"Tesses.WebServer/1.0.3.8": {
"dependencies": {
"MimeTypesMap": "1.0.8",
"Newtonsoft.Json": "13.0.1"
},
"runtime": {
"lib/netstandard2.0/Tesses.WebServer.NetStandard.dll": {
"assemblyVersion": "1.0.3.8",
"fileVersion": "1.0.3.8"
}
}
}
}
},
"libraries": {
"Tesses.WebServer.EasyServer/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"Microsoft.NETCore.Platforms/1.1.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==",
"path": "microsoft.netcore.platforms/1.1.0",
"hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512"
},
"MimeTypesMap/1.0.8": {
"type": "package",
"serviceable": true,
"sha512": "sha512-iOm6Zar+yVROhlyrGGSJTfThvNoHLUeYeQQND9YD/ot/nA2qsWUp9kP2MHTdF9P7I8afW6eCf8vdELLZjDFdSQ==",
"path": "mimetypesmap/1.0.8",
"hashPath": "mimetypesmap.1.0.8.nupkg.sha512"
},
"NETStandard.Library/2.0.3": {
"type": "package",
"serviceable": true,
"sha512": "sha512-st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==",
"path": "netstandard.library/2.0.3",
"hashPath": "netstandard.library.2.0.3.nupkg.sha512"
},
"Newtonsoft.Json/13.0.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==",
"path": "newtonsoft.json/13.0.1",
"hashPath": "newtonsoft.json.13.0.1.nupkg.sha512"
},
"Tesses.WebServer/1.0.3.8": {
"type": "package",
"serviceable": true,
"sha512": "sha512-3noCyyXgsiZhzKviqxbQaiqgIHGx0ZvxG9cepnddEbfFU20IYCzNRlgg0YraoDI3rNxkXNmsxGoKFd6xuKThYg==",
"path": "tesses.webserver/1.0.3.8",
"hashPath": "tesses.webserver.1.0.3.8.nupkg.sha512"
}
}
}

View File

@ -1,24 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Tesses")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyDescriptionAttribute("An easier way to setup server for Tesses.WebServer")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("Tesses.WebServer.EasyServer")]
[assembly: System.Reflection.AssemblyTitleAttribute("Tesses.WebServer.EasyServer")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyMetadataAttribute("RepositoryUrl", "https://gitlab.tesses.net/tesses50/tesses-webserver-extras")]
// Generated by the MSBuild WriteCodeFragment class.

View File

@ -1,3 +0,0 @@
is_global = true
build_property.RootNamespace = Tesses.WebServer.EasyServer
build_property.ProjectDir = /home/mike/Git/tesses-webserver-extras/Tesses.WebServer.EasyServer/

View File

@ -8,13 +8,3 @@
/home/mike/Tesses.WebServer.Extras/Tesses.WebServer.EasyServer/obj/Debug/netstandard2.0/Tesses.WebServer.EasyServer.csproj.CoreCompileInputs.cache /home/mike/Tesses.WebServer.Extras/Tesses.WebServer.EasyServer/obj/Debug/netstandard2.0/Tesses.WebServer.EasyServer.csproj.CoreCompileInputs.cache
/home/mike/Tesses.WebServer.Extras/Tesses.WebServer.EasyServer/obj/Debug/netstandard2.0/Tesses.WebServer.EasyServer.dll /home/mike/Tesses.WebServer.Extras/Tesses.WebServer.EasyServer/obj/Debug/netstandard2.0/Tesses.WebServer.EasyServer.dll
/home/mike/Tesses.WebServer.Extras/Tesses.WebServer.EasyServer/obj/Debug/netstandard2.0/Tesses.WebServer.EasyServer.pdb /home/mike/Tesses.WebServer.Extras/Tesses.WebServer.EasyServer/obj/Debug/netstandard2.0/Tesses.WebServer.EasyServer.pdb
/home/mike/Git/tesses-webserver-extras/Tesses.WebServer.EasyServer/bin/Debug/netstandard2.0/Tesses.WebServer.EasyServer.deps.json
/home/mike/Git/tesses-webserver-extras/Tesses.WebServer.EasyServer/bin/Debug/netstandard2.0/Tesses.WebServer.EasyServer.dll
/home/mike/Git/tesses-webserver-extras/Tesses.WebServer.EasyServer/bin/Debug/netstandard2.0/Tesses.WebServer.EasyServer.pdb
/home/mike/Git/tesses-webserver-extras/Tesses.WebServer.EasyServer/obj/Debug/netstandard2.0/Tesses.WebServer.EasyServer.csproj.AssemblyReference.cache
/home/mike/Git/tesses-webserver-extras/Tesses.WebServer.EasyServer/obj/Debug/netstandard2.0/Tesses.WebServer.EasyServer.GeneratedMSBuildEditorConfig.editorconfig
/home/mike/Git/tesses-webserver-extras/Tesses.WebServer.EasyServer/obj/Debug/netstandard2.0/Tesses.WebServer.EasyServer.AssemblyInfoInputs.cache
/home/mike/Git/tesses-webserver-extras/Tesses.WebServer.EasyServer/obj/Debug/netstandard2.0/Tesses.WebServer.EasyServer.AssemblyInfo.cs
/home/mike/Git/tesses-webserver-extras/Tesses.WebServer.EasyServer/obj/Debug/netstandard2.0/Tesses.WebServer.EasyServer.csproj.CoreCompileInputs.cache
/home/mike/Git/tesses-webserver-extras/Tesses.WebServer.EasyServer/obj/Debug/netstandard2.0/Tesses.WebServer.EasyServer.dll
/home/mike/Git/tesses-webserver-extras/Tesses.WebServer.EasyServer/obj/Debug/netstandard2.0/Tesses.WebServer.EasyServer.pdb

View File

@ -5,7 +5,7 @@
}, },
"projects": { "projects": {
"/home/mike/Git/tesses-webserver-extras/Tesses.WebServer.EasyServer/Tesses.WebServer.EasyServer.csproj": { "/home/mike/Git/tesses-webserver-extras/Tesses.WebServer.EasyServer/Tesses.WebServer.EasyServer.csproj": {
"version": "1.0.0", "version": "1.0.1",
"restore": { "restore": {
"projectUniqueName": "/home/mike/Git/tesses-webserver-extras/Tesses.WebServer.EasyServer/Tesses.WebServer.EasyServer.csproj", "projectUniqueName": "/home/mike/Git/tesses-webserver-extras/Tesses.WebServer.EasyServer/Tesses.WebServer.EasyServer.csproj",
"projectName": "Tesses.WebServer.EasyServer", "projectName": "Tesses.WebServer.EasyServer",
@ -20,8 +20,8 @@
"netstandard2.0" "netstandard2.0"
], ],
"sources": { "sources": {
"https://api.nuget.org/v3/index.json": {}, "/usr/share/dotnet/library-packs": {},
"https://gitlab.tesses.net/api/v4/projects/27/packages/nuget/index.json": {} "https://api.nuget.org/v3/index.json": {}
}, },
"frameworks": { "frameworks": {
"netstandard2.0": { "netstandard2.0": {
@ -61,7 +61,7 @@
], ],
"assetTargetFallback": true, "assetTargetFallback": true,
"warn": true, "warn": true,
"runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/6.0.401/RuntimeIdentifierGraph.json" "runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/6.0.404/RuntimeIdentifierGraph.json"
} }
} }
} }

View File

@ -7,7 +7,7 @@
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">/home/mike/.nuget/packages/</NuGetPackageRoot> <NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">/home/mike/.nuget/packages/</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">/home/mike/.nuget/packages/</NuGetPackageFolders> <NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">/home/mike/.nuget/packages/</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle> <NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.3.0</NuGetToolVersion> <NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.3.1</NuGetToolVersion>
</PropertyGroup> </PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' "> <ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="/home/mike/.nuget/packages/" /> <SourceRoot Include="/home/mike/.nuget/packages/" />

View File

@ -272,7 +272,7 @@
"/home/mike/.nuget/packages/": {} "/home/mike/.nuget/packages/": {}
}, },
"project": { "project": {
"version": "1.0.0", "version": "1.0.1",
"restore": { "restore": {
"projectUniqueName": "/home/mike/Git/tesses-webserver-extras/Tesses.WebServer.EasyServer/Tesses.WebServer.EasyServer.csproj", "projectUniqueName": "/home/mike/Git/tesses-webserver-extras/Tesses.WebServer.EasyServer/Tesses.WebServer.EasyServer.csproj",
"projectName": "Tesses.WebServer.EasyServer", "projectName": "Tesses.WebServer.EasyServer",
@ -287,8 +287,8 @@
"netstandard2.0" "netstandard2.0"
], ],
"sources": { "sources": {
"https://api.nuget.org/v3/index.json": {}, "/usr/share/dotnet/library-packs": {},
"https://gitlab.tesses.net/api/v4/projects/27/packages/nuget/index.json": {} "https://api.nuget.org/v3/index.json": {}
}, },
"frameworks": { "frameworks": {
"netstandard2.0": { "netstandard2.0": {
@ -328,7 +328,7 @@
], ],
"assetTargetFallback": true, "assetTargetFallback": true,
"warn": true, "warn": true,
"runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/6.0.401/RuntimeIdentifierGraph.json" "runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/6.0.404/RuntimeIdentifierGraph.json"
} }
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"version": 2, "version": 2,
"dgSpecHash": "oi1JJYGi80UXd+ulosZgXG9ORb6gFaI3VyXeS59kF0o5spICOPXYlMRUop7X37EelHP0J0RKWgzWLWq9F+sixg==", "dgSpecHash": "kAX/NoZ513On3Bg89ULA4Rg5icewcDtVUGsioa8NV6QAQyXbII2Ie370GpZr0iVHdQCa9ONihIhWGoUNoq8Xbg==",
"success": true, "success": true,
"projectFilePath": "/home/mike/Git/tesses-webserver-extras/Tesses.WebServer.EasyServer/Tesses.WebServer.EasyServer.csproj", "projectFilePath": "/home/mike/Git/tesses-webserver-extras/Tesses.WebServer.EasyServer/Tesses.WebServer.EasyServer.csproj",
"expectedPackageFiles": [ "expectedPackageFiles": [

View File

@ -1,13 +1,36 @@
using System.Collections.Generic; using System;
using System.Collections.Generic;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Web; using System.Web;
using Newtonsoft.Json;
using Tesses.WebServer; using Tesses.WebServer;
namespace Tesses.WebServer.Swagme namespace Tesses.WebServer.Swagme
{ {
public sealed class SwagmeDocumentation public sealed class SwagmeDocumentation
{ {
public SwagmeDocumentation(string url,string description,object reqData,object respData) : this(url,description,Json2Html(reqData,respData))
{
}
public SwagmeDocumentation(string url,string description,object jsonData) : this(url,description,Json2Html(jsonData))
{
}
private static string Json2Html(object o1,object o2)
{
string pg1=System.Web.HttpUtility.HtmlEncode(JsonConvert.SerializeObject(o1,Formatting.Indented));
string pg2 = System.Web.HttpUtility.HtmlEncode(JsonConvert.SerializeObject(o2,Formatting.Indented));
return $"<h4>Request:</h4><br><code>{pg1}</code><br><h4>Response:</h4><br><code>{pg2}</code>";
}
private static string Json2Html(object o)
{
return System.Web.HttpUtility.HtmlEncode(
JsonConvert.SerializeObject(o,Formatting.Indented));
}
public SwagmeDocumentation(string url,string description,string expandedDesc) :this(description,expandedDesc) public SwagmeDocumentation(string url,string description,string expandedDesc) :this(description,expandedDesc)
{ {
Url = url; Url = url;
@ -137,14 +160,14 @@ namespace Tesses.WebServer.Swagme
public void Add(string url,HttpActionAsync hndlr,SwagmeDocumentation documentation,string method="GET",string group="No Group") public void Add(string url,HttpActionAsync hndlr,SwagmeDocumentation documentation,string method="GET",string group="No Group")
{ {
if(string.IsNullOrWhiteSpace(documentation.Url)) documentation.Url = url; if(string.IsNullOrWhiteSpace(documentation.Url)) documentation.Url = url;
svr.Add(url,hndlr); svr.Add(url,hndlr,method);
docs.Add(group,(documentation,method)); docs.Add(group,(documentation,method));
rerender=true; rerender=true;
} }
public void Add(string url,HttpAction hndlr,SwagmeDocumentation documentation,string method="GET",string group="No Group") public void Add(string url,HttpAction hndlr,SwagmeDocumentation documentation,string method="GET",string group="No Group")
{ {
if(string.IsNullOrWhiteSpace(documentation.Url)) documentation.Url = url; if(string.IsNullOrWhiteSpace(documentation.Url)) documentation.Url = url;
svr.Add(url,hndlr); svr.Add(url,hndlr,method);
docs.Add(group,(documentation,method)); docs.Add(group,(documentation,method));
rerender=true; rerender=true;
} }

View File

@ -5,9 +5,9 @@
<PackageId>Tesses.WebServer.Swagme</PackageId> <PackageId>Tesses.WebServer.Swagme</PackageId>
<Author>Mike Nolan</Author> <Author>Mike Nolan</Author>
<Company>Tesses</Company> <Company>Tesses</Company>
<Version>1.0.1</Version> <Version>1.0.2</Version>
<AssemblyVersion>1.0.1</AssemblyVersion> <AssemblyVersion>1.0.2</AssemblyVersion>
<FileVersion>1.0.1</FileVersion> <FileVersion>1.0.2</FileVersion>
<Description>Documentation for Tesses.WebServer</Description> <Description>Documentation for Tesses.WebServer</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression> <PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageTags>HTTP, WebServer, Website, Documentation</PackageTags> <PackageTags>HTTP, WebServer, Website, Documentation</PackageTags>

View File

@ -13,11 +13,11 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Tesses")] [assembly: System.Reflection.AssemblyCompanyAttribute("Tesses")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyDescriptionAttribute("Documentation for Tesses.WebServer")] [assembly: System.Reflection.AssemblyDescriptionAttribute("Documentation for Tesses.WebServer")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.1")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.2")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.1")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.2")]
[assembly: System.Reflection.AssemblyProductAttribute("Tesses.WebServer.Swagme")] [assembly: System.Reflection.AssemblyProductAttribute("Tesses.WebServer.Swagme")]
[assembly: System.Reflection.AssemblyTitleAttribute("Tesses.WebServer.Swagme")] [assembly: System.Reflection.AssemblyTitleAttribute("Tesses.WebServer.Swagme")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.1")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.2")]
[assembly: System.Reflection.AssemblyMetadataAttribute("RepositoryUrl", "https://gitlab.tesses.net/tesses50/tesses-webserver-extras")] [assembly: System.Reflection.AssemblyMetadataAttribute("RepositoryUrl", "https://gitlab.tesses.net/tesses50/tesses-webserver-extras")]
// Generated by the MSBuild WriteCodeFragment class. // Generated by the MSBuild WriteCodeFragment class.

View File

@ -1 +1 @@
713e122aee86b675af34cb0d6136ec4d029dfad3 e482e12a25c78a82ada9a653bae626d45217d6a8

View File

@ -8,3 +8,13 @@
/home/mike/Tesses.WebServer.Extras/Tesses.WebServer.Swagme/obj/Debug/netstandard2.0/Tesses.WebServer.Swagme.csproj.CoreCompileInputs.cache /home/mike/Tesses.WebServer.Extras/Tesses.WebServer.Swagme/obj/Debug/netstandard2.0/Tesses.WebServer.Swagme.csproj.CoreCompileInputs.cache
/home/mike/Tesses.WebServer.Extras/Tesses.WebServer.Swagme/obj/Debug/netstandard2.0/Tesses.WebServer.Swagme.dll /home/mike/Tesses.WebServer.Extras/Tesses.WebServer.Swagme/obj/Debug/netstandard2.0/Tesses.WebServer.Swagme.dll
/home/mike/Tesses.WebServer.Extras/Tesses.WebServer.Swagme/obj/Debug/netstandard2.0/Tesses.WebServer.Swagme.pdb /home/mike/Tesses.WebServer.Extras/Tesses.WebServer.Swagme/obj/Debug/netstandard2.0/Tesses.WebServer.Swagme.pdb
/home/mike/Git/tesses-webserver-extras/Tesses.WebServer.Swagme/bin/Debug/netstandard2.0/Tesses.WebServer.Swagme.deps.json
/home/mike/Git/tesses-webserver-extras/Tesses.WebServer.Swagme/bin/Debug/netstandard2.0/Tesses.WebServer.Swagme.dll
/home/mike/Git/tesses-webserver-extras/Tesses.WebServer.Swagme/bin/Debug/netstandard2.0/Tesses.WebServer.Swagme.pdb
/home/mike/Git/tesses-webserver-extras/Tesses.WebServer.Swagme/obj/Debug/netstandard2.0/Tesses.WebServer.Swagme.csproj.AssemblyReference.cache
/home/mike/Git/tesses-webserver-extras/Tesses.WebServer.Swagme/obj/Debug/netstandard2.0/Tesses.WebServer.Swagme.GeneratedMSBuildEditorConfig.editorconfig
/home/mike/Git/tesses-webserver-extras/Tesses.WebServer.Swagme/obj/Debug/netstandard2.0/Tesses.WebServer.Swagme.AssemblyInfoInputs.cache
/home/mike/Git/tesses-webserver-extras/Tesses.WebServer.Swagme/obj/Debug/netstandard2.0/Tesses.WebServer.Swagme.AssemblyInfo.cs
/home/mike/Git/tesses-webserver-extras/Tesses.WebServer.Swagme/obj/Debug/netstandard2.0/Tesses.WebServer.Swagme.csproj.CoreCompileInputs.cache
/home/mike/Git/tesses-webserver-extras/Tesses.WebServer.Swagme/obj/Debug/netstandard2.0/Tesses.WebServer.Swagme.dll
/home/mike/Git/tesses-webserver-extras/Tesses.WebServer.Swagme/obj/Debug/netstandard2.0/Tesses.WebServer.Swagme.pdb

View File

@ -20,8 +20,8 @@
"netstandard2.0" "netstandard2.0"
], ],
"sources": { "sources": {
"https://api.nuget.org/v3/index.json": {}, "/usr/share/dotnet/library-packs": {},
"https://gitlab.tesses.net/api/v4/projects/27/packages/nuget/index.json": {} "https://api.nuget.org/v3/index.json": {}
}, },
"frameworks": { "frameworks": {
"netstandard2.0": { "netstandard2.0": {
@ -61,7 +61,7 @@
], ],
"assetTargetFallback": true, "assetTargetFallback": true,
"warn": true, "warn": true,
"runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/6.0.401/RuntimeIdentifierGraph.json" "runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/6.0.404/RuntimeIdentifierGraph.json"
} }
} }
} }

View File

@ -7,7 +7,7 @@
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">/home/mike/.nuget/packages/</NuGetPackageRoot> <NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">/home/mike/.nuget/packages/</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">/home/mike/.nuget/packages/</NuGetPackageFolders> <NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">/home/mike/.nuget/packages/</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle> <NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.3.0</NuGetToolVersion> <NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.3.1</NuGetToolVersion>
</PropertyGroup> </PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' "> <ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="/home/mike/.nuget/packages/" /> <SourceRoot Include="/home/mike/.nuget/packages/" />

View File

@ -287,8 +287,8 @@
"netstandard2.0" "netstandard2.0"
], ],
"sources": { "sources": {
"https://api.nuget.org/v3/index.json": {}, "/usr/share/dotnet/library-packs": {},
"https://gitlab.tesses.net/api/v4/projects/27/packages/nuget/index.json": {} "https://api.nuget.org/v3/index.json": {}
}, },
"frameworks": { "frameworks": {
"netstandard2.0": { "netstandard2.0": {
@ -328,7 +328,7 @@
], ],
"assetTargetFallback": true, "assetTargetFallback": true,
"warn": true, "warn": true,
"runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/6.0.401/RuntimeIdentifierGraph.json" "runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/6.0.404/RuntimeIdentifierGraph.json"
} }
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"version": 2, "version": 2,
"dgSpecHash": "jrqI50kN8o/hR4BKBLR/uhp9AohPcFEDdLXz4tyGp2tphrQqRaub+XXF5RQJKhFjmKJQK+3GAHoSk+etxaQjeg==", "dgSpecHash": "8VLxMjy52XeEa3GrQB97Ld6MYblO4SAOH3XdVD6AQ5OSZ0QJpE+y6VV1lQqYg5A8AMauZs5vUR2weowO8+W7mw==",
"success": true, "success": true,
"projectFilePath": "/home/mike/Git/tesses-webserver-extras/Tesses.WebServer.Swagme/Tesses.WebServer.Swagme.csproj", "projectFilePath": "/home/mike/Git/tesses-webserver-extras/Tesses.WebServer.Swagme/Tesses.WebServer.Swagme.csproj",
"expectedPackageFiles": [ "expectedPackageFiles": [

View File

@ -0,0 +1,16 @@
public class ExampleRequest
{
public int NumberOfTimes {get;set;}=42;
public string Name {get;set;}="Demetria";
public string BeforeNumber {get;set;}="Drops a computer";
public string AfterNumber {get;set;}="Times";
}
public class ExampleResponse
{
public string YourMessage {get;set;}="Demetria Drops a Computer 42 Times";
public int Number {get;set;}=42;
}

View File

@ -28,6 +28,17 @@ svr.Add("/SetValue",(e)=>{
} }
},new SwagmeDocumentation("/SetValue?num=42","Set a number","Set an integer in program<br><br><ul><li>num: <i>an integer</i></li></ul>"),"POST",group: "Setting Values"); },new SwagmeDocumentation("/SetValue?num=42","Set a number","Set an integer in program<br><br><ul><li>num: <i>an integer</i></li></ul>"),"POST",group: "Setting Values");
svr.Add("/JsonEx",async(ctx)=>{
var req= await ctx.ReadJsonAsync<ExampleRequest>();
string myMessage = $"{req.Name} {req.BeforeNumber} {req.NumberOfTimes} {req.AfterNumber}";
ExampleResponse resp=new ExampleResponse();
resp.Number = req.NumberOfTimes;
resp.YourMessage = myMessage;
await ctx.SendJsonAsync(resp);
},new SwagmeDocumentation("/JsonEx","Json Example Request Response",new ExampleRequest(),new ExampleResponse()),"POST","Json");
RouteServer rsvr=new RouteServer(); RouteServer rsvr=new RouteServer();
rsvr.Add("/",(e)=>{ rsvr.Add("/",(e)=>{
e.SendText("<!DOCTYPE html><html lang=\"en\"><head><meta charset=\"UTF-8\"><meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"><title>Swagme Test</title></head><body><h1>Swagme Test</h1><a href=\"./api/\">Api</a></body></html>"); e.SendText("<!DOCTYPE html><html lang=\"en\"><head><meta charset=\"UTF-8\"><meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"><title>Swagme Test</title></head><body><h1>Swagme Test</h1><a href=\"./api/\">Api</a></body></html>");

View File

@ -9,8 +9,8 @@
"Tesses.WebServer.SwagmeTest/1.0.0": { "Tesses.WebServer.SwagmeTest/1.0.0": {
"dependencies": { "dependencies": {
"Tesses.WebServer": "1.0.3.8", "Tesses.WebServer": "1.0.3.8",
"Tesses.WebServer.EasyServer": "1.0.0", "Tesses.WebServer.EasyServer": "1.0.1",
"Tesses.WebServer.Swagme": "1.0.0" "Tesses.WebServer.Swagme": "1.0.1"
}, },
"runtime": { "runtime": {
"Tesses.WebServer.SwagmeTest.dll": {} "Tesses.WebServer.SwagmeTest.dll": {}
@ -44,7 +44,7 @@
} }
} }
}, },
"Tesses.WebServer.EasyServer/1.0.0": { "Tesses.WebServer.EasyServer/1.0.1": {
"dependencies": { "dependencies": {
"Tesses.WebServer": "1.0.3.8" "Tesses.WebServer": "1.0.3.8"
}, },
@ -52,7 +52,7 @@
"Tesses.WebServer.EasyServer.dll": {} "Tesses.WebServer.EasyServer.dll": {}
} }
}, },
"Tesses.WebServer.Swagme/1.0.0": { "Tesses.WebServer.Swagme/1.0.1": {
"dependencies": { "dependencies": {
"Tesses.WebServer": "1.0.3.8" "Tesses.WebServer": "1.0.3.8"
}, },
@ -89,12 +89,12 @@
"path": "tesses.webserver/1.0.3.8", "path": "tesses.webserver/1.0.3.8",
"hashPath": "tesses.webserver.1.0.3.8.nupkg.sha512" "hashPath": "tesses.webserver.1.0.3.8.nupkg.sha512"
}, },
"Tesses.WebServer.EasyServer/1.0.0": { "Tesses.WebServer.EasyServer/1.0.1": {
"type": "project", "type": "project",
"serviceable": false, "serviceable": false,
"sha512": "" "sha512": ""
}, },
"Tesses.WebServer.Swagme/1.0.0": { "Tesses.WebServer.Swagme/1.0.1": {
"type": "project", "type": "project",
"serviceable": false, "serviceable": false,
"sha512": "" "sha512": ""

View File

@ -1 +1 @@
e007b5572406becde9d587823f10916ad4cf8c22 b8c680b21816fb8f259755bf9868d0f69cab48a9

View File

@ -5,7 +5,7 @@
}, },
"projects": { "projects": {
"/home/mike/Git/tesses-webserver-extras/Tesses.WebServer.EasyServer/Tesses.WebServer.EasyServer.csproj": { "/home/mike/Git/tesses-webserver-extras/Tesses.WebServer.EasyServer/Tesses.WebServer.EasyServer.csproj": {
"version": "1.0.0", "version": "1.0.1",
"restore": { "restore": {
"projectUniqueName": "/home/mike/Git/tesses-webserver-extras/Tesses.WebServer.EasyServer/Tesses.WebServer.EasyServer.csproj", "projectUniqueName": "/home/mike/Git/tesses-webserver-extras/Tesses.WebServer.EasyServer/Tesses.WebServer.EasyServer.csproj",
"projectName": "Tesses.WebServer.EasyServer", "projectName": "Tesses.WebServer.EasyServer",
@ -20,8 +20,8 @@
"netstandard2.0" "netstandard2.0"
], ],
"sources": { "sources": {
"https://api.nuget.org/v3/index.json": {}, "/usr/share/dotnet/library-packs": {},
"https://gitlab.tesses.net/api/v4/projects/27/packages/nuget/index.json": {} "https://api.nuget.org/v3/index.json": {}
}, },
"frameworks": { "frameworks": {
"netstandard2.0": { "netstandard2.0": {
@ -61,12 +61,12 @@
], ],
"assetTargetFallback": true, "assetTargetFallback": true,
"warn": true, "warn": true,
"runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/6.0.401/RuntimeIdentifierGraph.json" "runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/6.0.404/RuntimeIdentifierGraph.json"
} }
} }
}, },
"/home/mike/Git/tesses-webserver-extras/Tesses.WebServer.Swagme/Tesses.WebServer.Swagme.csproj": { "/home/mike/Git/tesses-webserver-extras/Tesses.WebServer.Swagme/Tesses.WebServer.Swagme.csproj": {
"version": "1.0.0", "version": "1.0.1",
"restore": { "restore": {
"projectUniqueName": "/home/mike/Git/tesses-webserver-extras/Tesses.WebServer.Swagme/Tesses.WebServer.Swagme.csproj", "projectUniqueName": "/home/mike/Git/tesses-webserver-extras/Tesses.WebServer.Swagme/Tesses.WebServer.Swagme.csproj",
"projectName": "Tesses.WebServer.Swagme", "projectName": "Tesses.WebServer.Swagme",
@ -81,8 +81,8 @@
"netstandard2.0" "netstandard2.0"
], ],
"sources": { "sources": {
"https://api.nuget.org/v3/index.json": {}, "/usr/share/dotnet/library-packs": {},
"https://gitlab.tesses.net/api/v4/projects/27/packages/nuget/index.json": {} "https://api.nuget.org/v3/index.json": {}
}, },
"frameworks": { "frameworks": {
"netstandard2.0": { "netstandard2.0": {
@ -122,7 +122,7 @@
], ],
"assetTargetFallback": true, "assetTargetFallback": true,
"warn": true, "warn": true,
"runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/6.0.401/RuntimeIdentifierGraph.json" "runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/6.0.404/RuntimeIdentifierGraph.json"
} }
} }
}, },
@ -142,8 +142,8 @@
"net6.0" "net6.0"
], ],
"sources": { "sources": {
"https://api.nuget.org/v3/index.json": {}, "/usr/share/dotnet/library-packs": {},
"https://gitlab.tesses.net/api/v4/projects/27/packages/nuget/index.json": {} "https://api.nuget.org/v3/index.json": {}
}, },
"frameworks": { "frameworks": {
"net6.0": { "net6.0": {
@ -189,7 +189,7 @@
"privateAssets": "all" "privateAssets": "all"
} }
}, },
"runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/6.0.401/RuntimeIdentifierGraph.json" "runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/6.0.404/RuntimeIdentifierGraph.json"
} }
} }
} }

View File

@ -7,7 +7,7 @@
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">/home/mike/.nuget/packages/</NuGetPackageRoot> <NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">/home/mike/.nuget/packages/</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">/home/mike/.nuget/packages/</NuGetPackageFolders> <NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">/home/mike/.nuget/packages/</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle> <NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.3.0</NuGetToolVersion> <NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.3.1</NuGetToolVersion>
</PropertyGroup> </PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' "> <ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="/home/mike/.nuget/packages/" /> <SourceRoot Include="/home/mike/.nuget/packages/" />

View File

@ -37,7 +37,7 @@
"lib/netstandard2.0/Tesses.WebServer.NetStandard.dll": {} "lib/netstandard2.0/Tesses.WebServer.NetStandard.dll": {}
} }
}, },
"Tesses.WebServer.EasyServer/1.0.0": { "Tesses.WebServer.EasyServer/1.0.1": {
"type": "project", "type": "project",
"framework": ".NETStandard,Version=v2.0", "framework": ".NETStandard,Version=v2.0",
"dependencies": { "dependencies": {
@ -50,7 +50,7 @@
"bin/placeholder/Tesses.WebServer.EasyServer.dll": {} "bin/placeholder/Tesses.WebServer.EasyServer.dll": {}
} }
}, },
"Tesses.WebServer.Swagme/1.0.0": { "Tesses.WebServer.Swagme/1.0.1": {
"type": "project", "type": "project",
"framework": ".NETStandard,Version=v2.0", "framework": ".NETStandard,Version=v2.0",
"dependencies": { "dependencies": {
@ -119,12 +119,12 @@
"tesses.webserver.nuspec" "tesses.webserver.nuspec"
] ]
}, },
"Tesses.WebServer.EasyServer/1.0.0": { "Tesses.WebServer.EasyServer/1.0.1": {
"type": "project", "type": "project",
"path": "../Tesses.WebServer.EasyServer/Tesses.WebServer.EasyServer.csproj", "path": "../Tesses.WebServer.EasyServer/Tesses.WebServer.EasyServer.csproj",
"msbuildProject": "../Tesses.WebServer.EasyServer/Tesses.WebServer.EasyServer.csproj" "msbuildProject": "../Tesses.WebServer.EasyServer/Tesses.WebServer.EasyServer.csproj"
}, },
"Tesses.WebServer.Swagme/1.0.0": { "Tesses.WebServer.Swagme/1.0.1": {
"type": "project", "type": "project",
"path": "../Tesses.WebServer.Swagme/Tesses.WebServer.Swagme.csproj", "path": "../Tesses.WebServer.Swagme/Tesses.WebServer.Swagme.csproj",
"msbuildProject": "../Tesses.WebServer.Swagme/Tesses.WebServer.Swagme.csproj" "msbuildProject": "../Tesses.WebServer.Swagme/Tesses.WebServer.Swagme.csproj"
@ -133,8 +133,8 @@
"projectFileDependencyGroups": { "projectFileDependencyGroups": {
"net6.0": [ "net6.0": [
"Tesses.WebServer >= 1.0.3.8", "Tesses.WebServer >= 1.0.3.8",
"Tesses.WebServer.EasyServer >= 1.0.0", "Tesses.WebServer.EasyServer >= 1.0.1",
"Tesses.WebServer.Swagme >= 1.0.0" "Tesses.WebServer.Swagme >= 1.0.1"
] ]
}, },
"packageFolders": { "packageFolders": {
@ -156,8 +156,8 @@
"net6.0" "net6.0"
], ],
"sources": { "sources": {
"https://api.nuget.org/v3/index.json": {}, "/usr/share/dotnet/library-packs": {},
"https://gitlab.tesses.net/api/v4/projects/27/packages/nuget/index.json": {} "https://api.nuget.org/v3/index.json": {}
}, },
"frameworks": { "frameworks": {
"net6.0": { "net6.0": {
@ -203,7 +203,7 @@
"privateAssets": "all" "privateAssets": "all"
} }
}, },
"runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/6.0.401/RuntimeIdentifierGraph.json" "runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/6.0.404/RuntimeIdentifierGraph.json"
} }
} }
} }

View File

@ -1,14 +1,14 @@
{ {
"version": 2, "version": 2,
"dgSpecHash": "CYh2YIaU38hSpRIpGUFMiPze1Jh4v0vFMgXAgrFXqESlLgKQlNsE8C07bepf7Sov3gLPkSeL+0+4+Q0SHNSyDQ==", "dgSpecHash": "Zseziu9K2R3v6wPvECPeJx8X1//fyEOUtqX4Amio/iiu+Kq7yAQrIUjPAlxB+hx2a1NggK8mkJ4fCh1rDYQPAg==",
"success": true, "success": true,
"projectFilePath": "/home/mike/Git/tesses-webserver-extras/Tesses.WebServer.SwagmeTest/Tesses.WebServer.SwagmeTest.csproj", "projectFilePath": "/home/mike/Git/tesses-webserver-extras/Tesses.WebServer.SwagmeTest/Tesses.WebServer.SwagmeTest.csproj",
"expectedPackageFiles": [ "expectedPackageFiles": [
"/home/mike/.nuget/packages/mimetypesmap/1.0.8/mimetypesmap.1.0.8.nupkg.sha512", "/home/mike/.nuget/packages/mimetypesmap/1.0.8/mimetypesmap.1.0.8.nupkg.sha512",
"/home/mike/.nuget/packages/newtonsoft.json/13.0.1/newtonsoft.json.13.0.1.nupkg.sha512", "/home/mike/.nuget/packages/newtonsoft.json/13.0.1/newtonsoft.json.13.0.1.nupkg.sha512",
"/home/mike/.nuget/packages/tesses.webserver/1.0.3.8/tesses.webserver.1.0.3.8.nupkg.sha512", "/home/mike/.nuget/packages/tesses.webserver/1.0.3.8/tesses.webserver.1.0.3.8.nupkg.sha512",
"/home/mike/.nuget/packages/tesses.webserver.easyserver/1.0.0/tesses.webserver.easyserver.1.0.0.nupkg.sha512", "/home/mike/.nuget/packages/tesses.webserver.easyserver/1.0.1/tesses.webserver.easyserver.1.0.1.nupkg.sha512",
"/home/mike/.nuget/packages/tesses.webserver.swagme/1.0.0/tesses.webserver.swagme.1.0.0.nupkg.sha512" "/home/mike/.nuget/packages/tesses.webserver.swagme/1.0.1/tesses.webserver.swagme.1.0.1.nupkg.sha512"
], ],
"logs": [] "logs": []
} }