Closed christianhelle closed 5 months ago
@kipusoep Is something like this interesting for you (see PR description)? I had someone request this to me at some point but I never got around to building it. I have a cold and have been sitting on the couch coding all day so I thought I could clean up the old backlog on my open-source projects
@kipusoep Is something like this interesting for you (see PR description)? I had someone request this to me at some point but I never got around to building it. I have a cold and have been sitting on the couch coding all day so I thought I could clean up the old backlog on my open-source projects
I'm not sure what the context is? Interesting for what exactly? :-)
Failed conditions
11.4% Coverage on New Code (required ≥ 80%)
I'm not sure what the context is? Interesting for what exactly? :-)
@kipusoep Generating multiple files instead of a single large code-behind file when using OpenAPI Generator. The output in this PR allows for a more understandable diff when re-generating code
@kipusoep the screenshot in the description shows the output of generating code based on the Swagger Petstore v3 spec using OpenAPI Generator v7.5.0 from this extension
Sounds good, but I'm still not sure what it's got to do with me specifically 😅
Sounds good, but I'm still not sure what it's got to do with me specifically 😅
LOL, I was pretty sure that you requested the feature but it seems I remembered wrong 😑
PR Classification
This pull request introduces a new feature that allows the generation of multiple files in the OpenApi C# generator.
PR Summary
The pull request adds a
GenerateMultipleFiles
option to the OpenApi C# generator, which can either copy source files to a destination directory and delete the source directory, or merge the source files, sanitize the merged file, and prefix it with an autogenerated code header.OpenApiCSharpGeneratorCommand.cs
andOpenApiCSharpCodeGenerator.cs
have been updated to handle the newGenerateMultipleFiles
option.CopyFilesAndDeleteSource
has been added toCSharpFileMerger.cs
to support the new feature.GenerateMultipleFiles
property has been added toDefaultOpenApiGeneratorOptions.cs
,IOpenApiGeneratorOptions.cs
,OpenApiGeneratorOptions.cs
, andOpenApiGeneratorOptionsPage.cs
.GenerateMultipleFiles
property value is now included inOpenApiGeneratorOptions.cs
.Screenshot