Forum Discussion

HgDorn's avatar
HgDorn
New Contributor
2 years ago

Best practice: API first, maintenance and versioning

Hi,

 

I'm looking for information on best practices on API-first approach.

It is well documented how to create your first API in SwaggerHub and generate the server stub initially.

But what is the workflow to maintain existing versions and to create new versions of your API, e.g. by adding new endpoints?

How to generate code for the new endpoints without overriding implementations or other changes already made in code?

 

Best regards,

Christoph

3 Replies

  • chichepo's avatar
    chichepo
    Champion Level 3

    Hello Christoph

    I am not sure it answers your question but I recommend you to investigate further the Codegen template topic (here)
    Another very interresting topic is the swagger-inflector (here) that is a real "Team collaborative" approach except that, this one, requires a "Design First" work mode.

    regards

    • HgDorn's avatar
      HgDorn
      New Contributor

      Hi chichepo,

       

      Thank you for your suggestions. But I'm looking for a workflow:

      How to do versioning and generate new parts for the existing API without overwriting already implemented parts.

       

       

      • chichepo's avatar
        chichepo
        Champion Level 3

        I guess you may need to use an additional source control software.
        It depends on your project methodology.

        From our side, we are using GitHub to manage our API versions.
        Look at this video for integration tools description.