-
-
Notifications
You must be signed in to change notification settings - Fork 7k
[REQ] New ASP.NET Core 3.0 server generator #2350
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
Comments
Let me get a vm with .net core 3 on sorted in the next few days.
I’ll then take a look at this, so if you could assign it to me that would be appreciated.
From: William Cheng <[email protected]>
Sent: 10 March 2019 14:34
To: OpenAPITools/openapi-generator <[email protected]>
Cc: Sean Farrow <[email protected]>; Mention <[email protected]>
Subject: [OpenAPITools/openapi-generator] [REQ] New ASP.NET Core 3.0 server generator (#2350)
To start with, we'll need to create the following:
* new AspNetCore3ServerCodegen.java based on AspNetCoreServerCodegen.java
* new resource folder modules/openapi-generator/src/main/resources/aspnetcore3 based on modules/openapi-generator/src/main/resources/aspnetcore (2.0 or 2.1)
* add batch file to generate Petstore samples under samples/server/petstore/aspnetcore3
cc @SeanFarrow<https://github.com/SeanFarrow>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#2350>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ABY1fsF1o-ouEvRUvDyVjGXa3edUjwmEks5vVRfzgaJpZM4bnS5r>.
|
@SeanFarrow |
I am interested in ASP.NET Core 3.0 and I have lots of manual things that I do with the 2.1 generator and I would really like a clean sheet .NET Core 3 including clients and Some features I would be interested/suggesting
|
Sure - no objections about that - just curious what do you have to do
manually? Moving to 3.0 would be a good idea - though I suspect it will
take a little time after it is releaseed before one can move to it.
…On 3/20/19 3:37 PM, sunn wrote:
I am interested in ASP.NET Core 3.0 and I have lots of manual things
that I do with the 2.1 generator and I would really like a clean sheet
.NET Core 3 including clients and using Microsoft's new high
performance json parser
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2350 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ANQEIem0GkY_q_XMpU4JfwqewR3pwgAQks5vYo3ugaJpZM4bnS5r>.
|
Discussions related to authentication support: #2352 |
Which generator should we base this from , current asp.net core? |
Based on what I seen so far Migrate from ASP.NET Core 2.2 to 3.0 Preview 2 it might not be that difficult to simply extend the current current generator for one more version. Particularly for the library and other classes. There's more in common than different, and there are some features that I am looking at for the current generator (e.g. Roslyn) that would be simpler to add in one place. @etherealjoy - can you summarize the manual changes that you have to do to go from 2.1 to 3.0? |
I did these
Additionally I was wondering if we use Json.NET or use MS internal Json package |
@etherealjoy it might be simpler to adopt the approach of using the generator to generate an abstract class and have the server implement it. I am waiting for #2629 to be merged and will be able to provide more concrete examples. |
Additionally using current aspnetcore generator I had to rearrange the layout of the folders and update the base images to point to mcr |
@etherealjoy might be helpful if you can create a simple example with the generated original code and the modified to work with 3.0 code. |
I'm now starting to look at Asp.Net core 3.0 and I would not recommend just upgrading the current generator as is as things like routing have changed. Also, for backwarrd compatibility, we will need to support Json.Net which has been removed in 3.0, but is still opt-in. I'm currently working on the Asp.net Core 2.x authorization/authentication support to ensure we support all security schemes in OAS v3, but can then look at this in more detail. Finally, asp.net core is still in preview, so to my thinking there really isn't any rush. |
The most important thing for me why I am working with .NET Core 3.0 already is official support for Linux arm64. But lets wait for MS Build and see I believe the ASP.NET Core 3.0 would be better off being a new generator. |
@etherealjoy @SeanFarrow I have it creating properly with 3.0 preview4: routing is still old and uses newtonsoft. Will put in the PR for it in a day or two (need to clean up the generator so the 2.2 break introduced is fixed). For the new features I suspect it will not be too difficult to extend. However I still hold that generating the server code is probably not the best approach - it will be better to use the generator to generate an abstract class, and then have the server implement an abstract class. I am documenting the approach - it leads to a better roundtrip for the server side development. |
Do you have a branch I can take a look at?
From: Amit Joshi <[email protected]>
Sent: 05 May 2019 04:39
To: OpenAPITools/openapi-generator <[email protected]>
Cc: Sean Farrow <[email protected]>; Mention <[email protected]>
Subject: Re: [OpenAPITools/openapi-generator] [REQ] New ASP.NET Core 3.0 server generator (#2350)
@etherealjoy<https://github.com/etherealjoy> @SeanFarrow<https://github.com/SeanFarrow> I have it creating properly with 3.0 preview4: routing is still old and uses newtonsoft. Will put in the PR for it in a day or two (need to clean up the generator so the 2.2 break introduced is fixed).
For the new features I suspect it will not be too difficult to extend.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#2350 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AALDK7QSCP4QRN6FDGHM2HDPTZJGDANCNFSM4G45FZVQ>.
|
@SeanFarrow - you can look at https://github.com/ihsmarkitoss/openapi-generator/tree/feature/version3 - still missing a little cleanup. but generally works if you set aspnetCoreVersion = 3.0 in thepom.xml From the branch 2.2 and 2.1 will beak (I know the issue but need to fix it) |
I have submitted the preliminary support changes in the PR #2824 |
Closed via #2824 |
To start with, we'll need to create the following:
modules/openapi-generator/src/main/resources/aspnetcore3
based onmodules/openapi-generator/src/main/resources/aspnetcore
(2.0 or 2.1)samples/server/petstore/aspnetcore3
cc @SeanFarrow
The text was updated successfully, but these errors were encountered: