Skip to content
This repository has been archived by the owner on Jun 29, 2020. It is now read-only.

Templateの修正 #21

Open
Laica-Lunasys opened this issue Dec 10, 2019 · 2 comments
Open

Templateの修正 #21

Laica-Lunasys opened this issue Dec 10, 2019 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@Laica-Lunasys
Copy link
Member

概要

  • Templateは、UIを構成したり、APIが受け取ったリクエスト内容をValidateする目的で使われる。
@Laica-Lunasys
Copy link
Member Author

Note

  • 現在、typeはすべて大文字で構成されているが、小文字での命名に変更する。 
  • -> STEP, RANGE -> step, range...

@Laica-Lunasys
Copy link
Member Author

Laica-Lunasys commented Dec 10, 2019

step

  • 任意の値を1つ選択できる。
  • 例: 風速設定, 風向設定
{
    "type": "step",
    "default": "auto",
    "step": [
        "auto",
        "low",
        "mid",
        "high"
    ]
}

range

  • 範囲内の数字を指定した段階で増減できる。
{
    "type": "range",
    "default": 21.0,
    "range": {
        "step": 1,
        "from": 16,
        "to": 31
    }
}

shot

  • 押されたときのみ、リクエストの値がtrueにされる
  • 押したあと、他のボタンを押された場合ではfalseのまま。
  • 例: 押すたびに変更される風向設定など
{
    "type": "shot",
    "value": "swing"
}

@Laica-Lunasys Laica-Lunasys added this to the v2 milestone Dec 10, 2019
@Laica-Lunasys Laica-Lunasys added the enhancement New feature or request label Dec 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant