Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the Asp.Net core server generator to support Asp.net Core 2.1 #1008

Merged
merged 15 commits into from
Sep 12, 2018
Merged

Update the Asp.Net core server generator to support Asp.net Core 2.1 #1008

merged 15 commits into from
Sep 12, 2018

Conversation

SeanFarrow
Copy link
Contributor

This PR updates the Asp.Net server generator to support Asp.Net core 2.1. It fixes issue #999.

@wing328
Copy link
Member

wing328 commented Sep 12, 2018

Upgrade Note

To fall back to ASP.NET core 2.0, please set aspnetCoreVersion to "2.0", e.g.

{
  "aspnetCoreVersion": "2.0"
}

or

--additional-properties aspnetCoreVersion="2.0"

@cbornet
Copy link
Member

cbornet commented Sep 18, 2018

I think the README must also be updated to 2.1

@@ -0,0 +1,18 @@
FROM microsoft/aspnetcore-build:2.0 AS build-env
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SeanFarrow do we need to update the line 1 and 15 to use microsoft/aspnetcore-build:2.1 instead?

@wing328
Copy link
Member

wing328 commented Sep 18, 2018

@cbornet I believe you're referring to the project's README as I couldn't find "2.0" in aspnetcore auto-generated README, right?

@SeanFarrow
Copy link
Contributor Author

SeanFarrow commented Sep 18, 2018 via email

@wing328
Copy link
Member

wing328 commented Sep 19, 2018

@cbornet good catch. I've created #1060 to track these enhancements.

@SeanFarrow
Copy link
Contributor Author

@wing328,
I'll do this later today.

jaumard pushed a commit to jaumard/openapi-generator that referenced this pull request Sep 21, 2018
…penAPITools#1008)

* Update the .net core sdk to v2.1 and update the asp.net packages used.

* Upgrade the SwashBuckle Asp.Net Core package to v3.0.0.

* Update the AppSettings json file and add a file used in development.
Also, remove the web.config file.

* Update the program template to use the web host builder class.

* Update the startup class to use the Asp.Net 2.1 paradigms.

* Update the launch settings json file.

* Update the controller template to derive from the ControllerBase class as aposed to Controller.

* Add the SwashBuckle annotations package.

* Add the SwashBuckle.AspNetCore.Annotations namespace to the controller template.

* Update the Startup template to add comments to the Configuration property and an env parameter to the Configure method.

* Update the startup class so we don't need to inject the hosting environment.

* Update the program class to have hte recommended CreateWebHostBuilder method from asp.net core 2.1.

* Update the asp.net core pet store sample server.

* add back aspnetcore 2.0 template via option

* remove web.config for aspnet core 2.1
@wing328
Copy link
Member

wing328 commented Oct 2, 2018

@SeanFarrow thanks again adding the ASP.net Core 2.1 support, which is included in the v3.3.0 minor release: https://twitter.com/oas_generator/status/1046941449609068544

A-Joshi pushed a commit to ihsmarkitoss/openapi-generator that referenced this pull request Feb 27, 2019
…penAPITools#1008)

* Update the .net core sdk to v2.1 and update the asp.net packages used.

* Upgrade the SwashBuckle Asp.Net Core package to v3.0.0.

* Update the AppSettings json file and add a file used in development.
Also, remove the web.config file.

* Update the program template to use the web host builder class.

* Update the startup class to use the Asp.Net 2.1 paradigms.

* Update the launch settings json file.

* Update the controller template to derive from the ControllerBase class as aposed to Controller.

* Add the SwashBuckle annotations package.

* Add the SwashBuckle.AspNetCore.Annotations namespace to the controller template.

* Update the Startup template to add comments to the Configuration property and an env parameter to the Configure method.

* Update the startup class so we don't need to inject the hosting environment.

* Update the program class to have hte recommended CreateWebHostBuilder method from asp.net core 2.1.

* Update the asp.net core pet store sample server.

* add back aspnetcore 2.0 template via option

* remove web.config for aspnet core 2.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants