swagger-api / swagger-api/swagger-codegen

how to generate files only if the spec is changed?

Open
#8,539 0 comments 10 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 maven plugin seems to re-generate files each time you re-run maven, no matter whether the input sepc file is changed (i.e. the last modification time is newer than any output files) or not, then it would make maven re-compile the generated files each time.

How to improve it? Just like what checkStaleness of protobuf-maven-plugin does.

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 repository file; start by locating the Maven plugin's generation entry point and compare its behavior with protobuf-maven-plugin's checkStaleness. Done means generation is skipped when the input spec is not newer than the generated outputs, preventing unnecessary recompilation.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.