議論

この要素は、次の詳細で構成されています。 パラメータ 、 ヘッダー そして 変数 リソースについて。

可能な場所

  • 熱 意/ヘルプ/ zest -仕様ファイル/コンポーネント/">コンポーネント - 熱 意/ヘルプ/ zest -指定ファイル/url/操作/導入/">操作 - 熱 意/ヘルプ/ zest -仕様ファイル/url/操作/応答/">応答

子要素

  • 熱 意/ヘルプ/ zest -仕様ファイル/非推奨/">非推奨 - 熱 意/ヘルプ/ zest -仕様ファイル/説明/">説明 - 熱意 /ヘルプ/ - zest 仕様ファイル/コンテンツ/紹介/">コンテンツ 必須 繰り返し

属性


お名前 タイプ 説明
お名前

必須

文字列 議論の名前です。
必須 ブール これは、リソース内の引数の要件ステータスを表します。

    * **真**: 議論は必須です。
    • 偽 (デフォルト): 引数はオプションです。
長さ 整数 (Csv) コンマで区切られた値の最小値と最大数を示します。 最大値のみを提供することもできます。
場所

必須

文字列 (列数) リソースの引数の場所。 可能な値は、 パラメータ、ヘッダー、変数。
区切り文字 文字列 引数内の複数の値の区切り記号を表します。
スタイル 文字列 (列数) セパレータスタイルは、 ZEST 引数のリストを分離するために使用する必要があります。 可能な値は次のとおりです。

    * **区切り文字**: 値のリストを分離するために使用される 1 つ以上の文字のシーケンス。
    • 標準 (デフォルト): リスト値はキーと値のペアで提供されます。
条件 文字列 議論を受け入れるために真である必要がある条件です。 チェック 熱 意/ヘルプ/ zest -仕様ファイル/条件/">ここ 条件についてもっと知る。
同時 文字列 (Csv) この引数と同時に渡さなければならない引数の名前。
非同時 文字列 (Csv) この引数と同時に渡すことを許可してはならない引数の名前。
可視性 文字列 (列数) 要素を表示して使用できるユーザーを決定します。 可能な値は、 **内部, プライベート, パブリック**. デフォルト値はパブリックです。

注:

の議論を書いている場合は、 Url パス変数 、 お名前 引数の属性は、url で指定された変数名と同じである必要があります。 たとえば、/トラベルビューロー/v4/トリップ/{ID} は URL パスであり、引数は Id (Url パス変数の名前)。

サンプル

簡単な議論

トリップ リソースには、2 つのパラメーターを追加します。 その詳細は以下の通りです。

copy

  • destination: Possible values are destination names from the destinations resource. This parameter is mandatory and accepts a character length of 1 to 20.

  • include: Possible value is ‘adventure_activities’. The key adventure_activities should be visible in the response only if this parameter is present in the request.

これが最初の要件の議論です。

copy

<argument name="destination" location="param" required="true">
 <content>
 <encode type="text/plain" />
 <structure>
 <property type="string" path="destinations:$.destination_name" length="1,20" />
 </structure>
 </content>
 </argument>

次に、2 番目の要件について、次のように引数を構成します。

copy

<argument name="include" location="param">
 <content>
 <encode type="text/plain" />
 <structure>
 <property type="string" values="adventure_activities" />
 </structure>
 </content>
 </argument>

冒険活動のために 熱 意/ヘルプ/ zest -仕様ファイル/構造/プロパティ/導入/"> この引数が使用されている場合にのみ表示されるには、 応答のための条件 プロパティ内の属性。

copy

<property name="adventure_activities" type="collections" condition-for-response="REQUEST:$.params.include!= null" />

を参照してください。 熱 意/ヘルプ/ zest -指定ファイル/データパス/">データパス そして 熱 意/ヘルプ/ zest -仕様ファイル/条件/">条件 このサンプルで使用される条件とデータパスの構築について詳しくは、こちらをご覧ください。 —

複雑な議論

同じトリップ リソースに対して、他の 3 つの引数を設定する必要があります。 パラメータの要件は次のとおりです。

copy

  • travelers: Possible values are traveler names from travelers resource. This is a mandatory parameter and supports CSV. It can have a minimum of 1 and maximum of 10 values.
  • page: This parameter must not be picked along with the travelers parameter. This should be of integer type. The value can fall between 1 to 500.
  • page_token: This parameter must be picked with the page parameter only when its value is greater than 11. This should be of string type.

次に、ここに示すように、これらの要件を取得するために必要な属性で引数を記述します。

copy

<argument name="travelers" location="param" required="true" length="1,50" style="delimiter" delimiter="," non-concurrent="page">
 <content>
 <encode type="text/plain" />
 <structure>
 <property type="string" path="travelers:$.traveler_name"/>
 </structure>
 </content>
 </argument>
 <argument name="page" location="param" non-concurrent="travelers" concurrent="page">
 <content>
 <encode type="text/plain" />
 <structure>
 <property type="integer" range="1,500"/>
 </structure>
 </content>
 </argument>
 <argument name="page_token" location="param" concurrent="page" condition="REQUEST:$.params.page > 10">
 <content>
 <encode type="text/plain" />
 <structure>
 <property type="string"/>
 </structure>
 </content>
 </argument>

Last Updated 2026-02-06 15:55:45 +0530 IST