OpenAPITools / OpenAPITools/openapi-generator-cli

[Question] How are placeholders passed to config?

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

@kay-schecker がすでに取り組んでいます。

2022年4月27日 から。

bug
主要言語
TypeScript
スター
2k
フォーク
208
平均マージ
7時間 12分
マージ済み PR(30日)
6

説明

Hi.

When using config via openapitools.json, the documentation states that placeholders are in use, e.g for. cwd and name:

{
  "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json",
  "spaces": 2,
  "generator-cli": {
    "version": "5.1.1",
    "generators": { // optional
      "my-generator": 
        "generatorName": "typescript-angular",
         "inputSpec": "#{cwd}/specs/${name}.json",
        "output": "#{cwd}/output/#{name}",
      }
    }
  }
}

My question is how do I pass the placeholders in the command? Ive tried

yarn run openapi-generator-cli generate --generator-key my-generator --name my-spec, but the name property doesnt get through to the generator:

[error] The spec file is not found: {..this path is correct (cwd)....}/specs/.json <---- name is missing

I could use something like envsubst, but that seems unnecessary?

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

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

評価

この issue はまだ評価されていません。

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

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