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

Creation of a new target succeeds despite empty name

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

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
java
領域
api

調査の方向性

Start at the POST /rest/v1/targets endpoint and trace how target creation handles the name field. Reproduce the request from the issue's shell example; done means an empty name is rejected instead of creating a target named after its controller ID.

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

説明

I'm working on a library providing Go bindings for Eclipse Hawkbit. As a part of the process I created integration tests that interrogate a real Hawkbit installation to see how it behaves.

According to the documentation at https://www.eclipse.org/hawkbit/rest-api/targets-api-guide/#_create_list_of_targets the name fields is mandatory when creating a target. Providing an empty value unexpectedly succeeds, with the name being set to the controller ID.

See the sample shell test program I created.

    # We should not be able to create a target with an empty name
    # https://www.eclipse.org/hawkbit/rest-api/targets-api-guide/#_create_list_of_targets
    curl \
        --verbose \
        --dump-header resp.head \
        --output resp.body \
        -H "$TEST_HAWKBIT_AUTH" \
        -H 'Accept: application/hal+json' \
        -H 'Content-Type: application/json;charset=UTF-8' \
        "${TEST_HAWKBIT_URL}/rest/v1/targets" \
        -d '[{"controllerId": "1001", "name": "",  "description": "First test device", "securityToken": "9999", "address": "https://localhost:8001"}]'

    # The request unexpected succeeds.
    fromdos resp.head
    GREP -qFx 'HTTP/1.1 201 Created' < resp.head

    # The returned data is sane.
    jq '.[0].controllerId' -r < resp.body | GREP -qFx 1001
    # The name seems to default to the value of the controllerId.
    jq '.[0].name' -r < resp.body | GREP -qFx "1001"
    jq '.[0].description' -r < resp.body | GREP -qFx "First test device"
    jq '.[0].createdBy' -r < resp.body | GREP -qFx admin
    jq '.[0].lastModifiedBy' -r < resp.body | GREP -qFx admin
    jq '.[0].updateStatus' -r < resp.body | GREP -qFx unknown
    jq '.[0]._links.self.href' -r < resp.body | GREP -qFx "${TEST_HAWKBIT_URL}/rest/v1/targets/1001"
主要言語
Java
スター
601
フォーク
228
平均マージ
18時間 20分
マージ済み PR(30日)
58

環境構築

はじめの一歩

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

eclipse-hawkbit/hawkbit のほかの issue

eclipse-hawkbit/hawkbit の issue をすべて見る

似ている issue

Java の issue をもっと見る

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

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