Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

String Interpolation for Update Values

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

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

まだ誰も着手していません。

  • #238 @baywet による — マージされずにクローズ

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
静か

調査の方向性

まず、リンクされている Environment Variables issue と、この issue で参照されている Arazzo の例を読み、その後ここでの議論を確認してください。提案されている $env.VAR_NAME 構文と併せて、プレフィックスおよびサフィックス付きの補間をサポートすべきかどうかを判断してください。完了には、合意された設計と仕様への明確な変更が必要です。

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

説明

Was on call with @lornajane today and we discussed Environment Variables and the topic of string interpolation came up.

Lorna proposed using a $env.VAR_NAME syntax, and while we were looking around for prior art we found what appears to be an example of string interpolation in the Arazzo examples which I will copy here, specifically "couponCode": "{$inputs.coupon_code}",:

Example from Arazzo:

  contentType: application/json
  payload: |
    {
      "petOrder": {
        "petId": "{$inputs.pet_id}",
        "couponCode": "{$inputs.coupon_code}",
        "quantity": "{$inputs.quantity}",
        "status": "placed",
        "complete": false
      }
    }

The above example does not have any suffix or prefix literals, but I can imagine that if could:

Example modified to show suffixes and prefixes:

  contentType: application/json
  payload: |
    {
      "petOrder": {
        "petId": "{$inputs.pet_id}000",
        "couponCode": "coupon-{$inputs.coupon_code}",
        "quantity": "{$inputs.quantity}",
        "status": "placed",
        "complete": false
      }
    }

We both agreed there was value to incorporating string interpolation although Lorna argued against doing it sooner than later (I will let her elaborate as to why.)

I argued if we were to adopt Arazzo's style of variables (which I support) — e.g. $env.VAR_NAME — then also supporting string interpolation would be very small incremental lift for implementors with an outsized increase in utility to support more of the 80 percentile of use-cases.

This of course assumes we do not envision that supporting it would block some future capability we plan for in the future.

Lorna asked me to create an issue so that others could weigh in on the idea, and here it is.

主要言語
JavaScript
スター
121
フォーク
38
平均マージ
1日 17時間
マージ済み PR(30日)
9

環境構築

はじめの一歩

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

OAI/Overlay-Specification のほかの issue

OAI/Overlay-Specification の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

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

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