[BUG][RUST] RustClientCodegen does not check RUST_POST_PROCESS_FILE or run rustfmt

オープン
#25,612 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@AnthemZach がすでに取り組んでいます。

2026年11月10日 から。

  • #25614 @AnthemZach による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
java, rust
領域
backend, tooling

調査の方向性

Read the RustClient generator and compare its post-processing behavior with the RustAxum generator, which the issue identifies as the working example. Reproduce with the provided CLI command and cargo fmt --check; done means RustClient honors RUST_POST_PROCESS_FILE and formats generated code. An open linked pull request (#25614) already addresses the issue.

索引モデルが issue の本文から書いたものです。

説明

Issue: Bug
Bug Report Checklist
  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator?
  • 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

Clients generated with -g rust contain code that fails standard rust linting (e.g. cargo fmt --check and cargo clippy). The RustAxum generator already checks RUST_POST_PROCESS_FILE and Overrides postProcessFile to ensure rustfmt is run. The same method could be used for the RustClient generator.

openapi-generator version

v7.27.0 not a regression, I don't think this has ever worked.

OpenAPI declaration file content or url
Generation Details
Steps to reproduce
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g rust -o /tmp/rust_api_client --enable-post-process-file
cd /tmp/rust_api_client/
cargo fmt --check # shows failures
Related issues/PRs
Suggest a fix
主要言語
Java
スター
26.9k
フォーク
7.8k
平均マージ
2日 10時間
マージ済み PR(30日)
180

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

OpenAPITools/openapi-generator のほかの issue

OpenAPITools/openapi-generator の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。