swagger-api / swagger-api/swagger-codegen

Generate sources only if inputSpec changed

Open
#8,362 0 comments 2 reactions 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

The plugin generates the generated-sources unconditionally. This causes the compilation of these sources to run over and over again.

The plugin should only generate sources if the target generated sources don't exist, or if the
inputSpec file is newer than the generated sources.

This will prevent redundant compilations.
If this suggested behavior is not desirable in all cases, it is possible to control it using a configuration flag.

Swagger-codegen version

All

Swagger declaration file content or url
Command line used for generation
Steps to reproduce
Related issues/PRs
Suggest a fix/enhancement

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 no source files or tests. Start by locating the plugin's generated-source logic and how it receives inputSpec, then inspect the existing generation workflow. Done means sources are generated when missing or when inputSpec is newer, without redundant compilation; add or update coverage for these cases.

Written by the indexing model from the issue text.

Assessment

Domain
build-system
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.