JSON pointer to elements in arrays of non-fixed length

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
20/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
aws
領域
cloud

調査の方向性

Issue では、repository のファイル、テスト、entry point のいずれも指定されていません。まずサンプルスキーマとその writeOnlyProperties パスを確認し、次に可変長配列の要素がサポートされているかどうかを判断してください。サポートされる expression を文書化するか、代替手段が必要であることを確認できれば完了です。

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

説明

Kindly let me know if this is the wrong place to ask this question.

Given the following sample schema, property Services is an array of non-fixed length.

{
    "definitions": {
        "Service": {
            "properties": {
                "Id": {
                    "description": "The ID of the service instance.",
                    "type": "string"
                },
                "Type": {
                    "description": "The type of the service instance.",
                    "type": "string"
                }
            },
            "additionalProperties": false
        }
    },
    "properties": {
        "Id": {
            "description": "Unique identifier.",
            "type": "string"
        },
        "Services": {
            "description": "The list of services.",
            "type": "array",
            "items": {
                "$ref": "#/definitions/Service"
            }
        }
    },
    "additionalProperties": false,
    "readOnlyProperties": [
        "/properties/Id"
    ],
    "primaryIdentifier": [
        "/properties/Id"
    ],
    "writeOnlyProperties": [
        "/properties/Services/0/Id"
    ]
}

How could I express in the schema that the Id property in the Service data is write-only?
I mean what json pointers should I put in writeOnlyProperties.

If the Services array is of fixed length, I could list all /properties/Services/0/Id, /properties/Services/1/Id, ..., there, but it's of non-fixed length.

If it's not possible, is there any other way to express this?

Thanks,

主要言語
Python
スター
336
フォーク
173
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

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

aws-cloudformation/cloudformation-cli のほかの issue

aws-cloudformation/cloudformation-cli の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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