OpenAPITools / OpenAPITools/openapi-generator

[BUG] Description- setBuildContext method is missing in CodeGenMojo class from 7.7.0 version

Open
#19,402 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue: Bug
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Bug Report Checklist
  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

I see one setter method is missing in latest version of CodeGenMojo class.

openapi-generator version 7.7.0 and 7.8.0

Earlier I was using 7.3.0 and to use support for angular 18 I am moving to 7.7.0/7.80 but getting compile time error as setBuildContext method is missing in new version

I am having a below code and now getting compile time error as setsetBuildContext is not available

CodeGenMojo codeGen = new CodeGenMojo();
DefaultBuildContext buildContext = new DefaultBuildContext();
buildContext.enableLogging(new ConsoleLogger(1, this.getClass().getSimpleName()));
codeGen.setBuildContext(buildContext);

OpenAPI declaration file content or url
Generation Details
Steps to reproduce

Just open codegenmojo class from 7.7.0 you will see method is missing

Related issues/PRs
Suggest a fix

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 comparing CodeGenMojo in versions 7.3.0, 7.7.0, and 7.8.0, focusing on the setBuildContext method and its callers. Reproduce the reported compile-time failure with the shown CodeGenMojo usage. Done means the intended build-context behavior is restored or the supported replacement is made clear and covered by an appropriate test.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.