OpenAPITools / OpenAPITools/openapi-generator

[REQ] Server integration test to make sure the actually generated server compiles and responds

Open
#4,260 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement: Feature
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Is your feature request related to a problem? Please describe.

When I make changes to the template or generator, I'd like to make sure things aren't broken by my changes e.g the python server won't start, the java server won't compile, the nodejs server fails at npm install because of missing dependencies, etc.

Describe the solution you'd like

An integration test per server generator that then tries to start up the server and make requests as defined in the spec. The best case would be to generate a client of the same language that does the requests, that way one cover the clients as well.

Describe alternatives you've considered

Not sure 🤔 That's all I've got at the moment

Additional context

I feel that this isn't exactly a duplicate of #969 since its goal is to test clients, not servers, but I do admit they are very similar. Implementing this might actually solve that one in the process, but I'm not sure.

I may be missing something since I do notice there's an option to generate tests, but

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

Start by reviewing the existing server-generator test flow and the mentioned option to generate tests. Define the scope per server generator, including generation, startup, dependency installation, compilation where applicable, and requests from the OpenAPI specification; done means the generated server responds successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, nodejs, python
Domain
backend-api-design, testing-qa
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.