forked from OpenAPITools/openapi-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ASP.NET Core 5.0 support (OpenAPITools#8717)
* add aspnet core 5.0 support * skip overwriting Org.OpenAPITools.csproj * update doc * update doc
- Loading branch information
Showing
37 changed files
with
3,984 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
generatorName: aspnetcore | ||
outputDir: samples/server/petstore/aspnetcore-5.0 | ||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml | ||
templateDir: modules/openapi-generator/src/main/resources/aspnetcore/3.0 | ||
additionalProperties: | ||
packageGuid: '{3C799344-F285-4669-8FD5-7ED9B795D5C5}' | ||
aspnetCoreVersion: "5.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
samples/server/petstore/aspnetcore-5.0/.openapi-generator-ignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# OpenAPI Generator Ignore | ||
# Generated by openapi-generator https://github.com/openapitools/openapi-generator | ||
|
||
# Use this file to prevent files from being overwritten by the generator. | ||
# The patterns follow closely to .gitignore or .dockerignore. | ||
|
||
# As an example, the C# client generator defines ApiClient.cs. | ||
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: | ||
#ApiClient.cs | ||
|
||
# You can match any string of characters against a directory, file or extension with a single asterisk (*): | ||
#foo/*/qux | ||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux | ||
|
||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**): | ||
#foo/**/qux | ||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux | ||
|
||
# You can also negate patterns with an exclamation (!). | ||
# For example, you can ignore all files in a docs folder with the file extension .md: | ||
#docs/*.md | ||
# Then explicitly reverse the ignore rule for a single file: | ||
#!docs/README.md | ||
src/Org.OpenAPITools/Org.OpenAPITools.csproj |
28 changes: 28 additions & 0 deletions
28
samples/server/petstore/aspnetcore-5.0/.openapi-generator/FILES
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
Org.OpenAPITools.sln | ||
README.md | ||
build.bat | ||
build.sh | ||
src/Org.OpenAPITools/.gitignore | ||
src/Org.OpenAPITools/Attributes/ValidateModelStateAttribute.cs | ||
src/Org.OpenAPITools/Authentication/ApiAuthentication.cs | ||
src/Org.OpenAPITools/Controllers/PetApi.cs | ||
src/Org.OpenAPITools/Controllers/StoreApi.cs | ||
src/Org.OpenAPITools/Controllers/UserApi.cs | ||
src/Org.OpenAPITools/Converters/CustomEnumConverter.cs | ||
src/Org.OpenAPITools/Dockerfile | ||
src/Org.OpenAPITools/Filters/BasePathFilter.cs | ||
src/Org.OpenAPITools/Filters/GeneratePathParamsValidationFilter.cs | ||
src/Org.OpenAPITools/Models/ApiResponse.cs | ||
src/Org.OpenAPITools/Models/Category.cs | ||
src/Org.OpenAPITools/Models/Order.cs | ||
src/Org.OpenAPITools/Models/Pet.cs | ||
src/Org.OpenAPITools/Models/Tag.cs | ||
src/Org.OpenAPITools/Models/User.cs | ||
src/Org.OpenAPITools/OpenApi/TypeExtensions.cs | ||
src/Org.OpenAPITools/Program.cs | ||
src/Org.OpenAPITools/Properties/launchSettings.json | ||
src/Org.OpenAPITools/Startup.cs | ||
src/Org.OpenAPITools/appsettings.json | ||
src/Org.OpenAPITools/wwwroot/README.md | ||
src/Org.OpenAPITools/wwwroot/index.html | ||
src/Org.OpenAPITools/wwwroot/openapi-original.json |
1 change: 1 addition & 0 deletions
1
samples/server/petstore/aspnetcore-5.0/.openapi-generator/VERSION
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
5.1.0-SNAPSHOT |
22 changes: 22 additions & 0 deletions
22
samples/server/petstore/aspnetcore-5.0/Org.OpenAPITools.sln
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 15 | ||
VisualStudioVersion = 15.0.27428.2043 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.OpenAPITools", "src\Org.OpenAPITools\Org.OpenAPITools.csproj", "{3C799344-F285-4669-8FD5-7ED9B795D5C5}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{3C799344-F285-4669-8FD5-7ED9B795D5C5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{3C799344-F285-4669-8FD5-7ED9B795D5C5}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{3C799344-F285-4669-8FD5-7ED9B795D5C5}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{3C799344-F285-4669-8FD5-7ED9B795D5C5}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Org.OpenAPITools - ASP.NET Core 5.0 Server | ||
|
||
This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. | ||
|
||
## Run | ||
|
||
Linux/OS X: | ||
|
||
``` | ||
sh build.sh | ||
``` | ||
|
||
Windows: | ||
|
||
``` | ||
build.bat | ||
``` | ||
## Run in Docker | ||
|
||
``` | ||
cd src/Org.OpenAPITools | ||
docker build -t org.openapitools . | ||
docker run -p 5000:8080 org.openapitools | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
:: Generated by: https://openapi-generator.tech | ||
:: | ||
|
||
@echo off | ||
|
||
dotnet restore src\Org.OpenAPITools | ||
dotnet build src\Org.OpenAPITools | ||
echo Now, run the following to start the project: dotnet run -p src\Org.OpenAPITools\Org.OpenAPITools.csproj --launch-profile web. | ||
echo. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Generated by: https://openapi-generator.tech | ||
# | ||
|
||
dotnet restore src/Org.OpenAPITools/ && \ | ||
dotnet build src/Org.OpenAPITools/ && \ | ||
echo "Now, run the following to start the project: dotnet run -p src/Org.OpenAPITools/Org.OpenAPITools.csproj --launch-profile web" |
Oops, something went wrong.