swagger-api / swagger-api/swagger-codegen

[ASPNETCORE] Generating the server stub overrides the implementation

Open
#8,875 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Description

I made an initial version of the code for my project from a swagger.yaml file, but I would like to be able to update the files after changing the swagger file, without overriding completely all the implementation that I added afterwards to my files, but I can't see any option.

It could be nice if the controllers were partial, or interfaces instead, so that I can have the implementation in separate files.

Is there any other workaround that people are using? How do you make an upgrade of your generated files without having to manually pick the files that have been changed?

Swagger-codegen version

I'm currently using swagger-codegen 2.3.1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names swagger-codegen 2.3.1 and ASPNETCORE server stubs, but no source files or tests. Start by locating the ASPNETCORE templates and generation entry point; compare regeneration with a hand-edited controller, and define done as preserving custom implementation while updating generated output.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, openapi
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.