REST schema advertises unsupported media types for upload and script-files
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
まず、プロジェクトのアップロードとスクリプトファイルの各エンドポイントに関する API スキーマ宣言を見つけ、そこで示されているメディアタイプと各アクションが受け付けるリクエスト形式を比較してください。POST /projects/{id}/upload/ のスキーマには multipart/form-data のみが、PUT /projects/{id}/script-files/ のスキーマには application/json のみが記載されていることを確認し、生成された Swagger UI で両方の形式を確認してください。
索引モデルが issue の本文から書いたものです。
説明
Plugin Version
v0.0.1
NetBox Version
v4.7.3
Python Version
3.12
Steps to Reproduce
- As a superuser, use Scripts > Projects > Upload Script to create an upload-based Project containing a valid
deploy.py. Note the Project ID. - Open
/api/schema/swagger-ui/and inspect the request body media types for:POST /api/plugins/netbox-scripts/projects/{id}/upload/PUT /api/plugins/netbox-scripts/projects/{id}/script-files/
- Send an authenticated JSON POST to the upload endpoint, with the contents of
deploy.pyas a string infile. - Send an authenticated multipart PUT to the script-files endpoint, with a text part named
pathscontainingdeploy.py.
Expected Behavior
The upload schema advertises only multipart/form-data, and the Script File selection schema advertises only application/json.
Observed Behavior
Both operations advertise application/json and multipart/form-data.
The JSON upload returns HTTP 400:
The submitted data was not a file. Check the encoding type on the form.
The multipart selection returns HTTP 400:
Provide a list of source paths.
Multipart uploads and JSON selections work. Swagger UI and generated clients can therefore offer a request format that the action cannot use.
- 主要言語
- Python
- スター
- 8
- フォーク
- 0
- 平均マージ
- 11時間 23分
- マージ済み PR(30日)
- 24
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
netbox-community/netbox-scripts のほかの issue
-
app: scripts severity: low status: backlog type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
netbox-community/netbox-scripts#94 ·
メンテナーはふだん 1 日以内に返信
-
app: scripts severity: medium status: backlog type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
netbox-community/netbox-scripts#83 ·
メンテナーはふだん 1 日以内に返信
-
app: scripts status: backlog type: documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
netbox-community/netbox-scripts#80 ·
メンテナーはふだん 1 日以内に返信
-
app: scripts severity: medium status: backlog type: bug
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
netbox-community/netbox-scripts#79 ·
メンテナーはふだん 1 日以内に返信
-
app: scripts severity: medium status: backlog type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
netbox-community/netbox-scripts#77 ·
メンテナーはふだん 1 日以内に返信
netbox-community/netbox-scripts の issue をすべて見る
似ている issue
-
ReadQwen3PaperTask5 rejects correct answers that differ only in order, case, or underscore form対応中かも @Kingpython123 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
Tongyi-MAI/MobileWorld#72 ·
-
_threads/application: Update typing annotations using `pyupgrade --py311-plus`対応中かも @gudnimg が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
Health probes return 401 when authentication is enabled and the API is served under /orb対応中かも @fgogolli が今日担当しました。 オープンarea: api priority: p2 size: S type: bug
難易度 2/5 半日 初心者へのやさしさ 75/100
finos/open-resource-broker#704 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
BCDA-APS/polar-bits#93 ·
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
GoogleCloudPlatform/gce-rescue#218 ·
メンテナーはふだん 2 日以内に返信