christianhelle / apiclientcodegen

A collection of Visual Studio custom tool code generators for Swagger / OpenAPI specification files
http://bit.ly/restapicodegen
GNU General Public License v3.0
177 stars 23 forks source link

Add support for generating multiple files with OpenAPI Generator #886

Closed christianhelle closed 5 months ago

christianhelle commented 5 months ago

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.

Screenshot

image

image

christianhelle commented 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 commented 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

I'm not sure what the context is? Interesting for what exactly? :-)

sonarcloud[bot] commented 5 months ago

Quality Gate Failed Quality Gate failed

Failed conditions
11.4% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

christianhelle commented 5 months ago

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

christianhelle commented 5 months ago

@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

kipusoep commented 5 months ago

Sounds good, but I'm still not sure what it's got to do with me specifically 😅

christianhelle commented 5 months ago

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 😑