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

Escaping API inconsistencies

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
45/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
java
領域
api

調査の方向性

まず、Java クライアントにおける expositionFormats.findWriter API、writer の write メソッド、EscapingScheme.fromAcceptHeader の使用箇所を追跡します。キャッシュされた writer がどのように扱われているかを比較し、API が異なる可能性のある 2 つのヘッダーを受け入れないようにする方法を判断します。完了の条件は、writer のキャッシュを失わずに、提案された使用方法に一貫性があることです。

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

説明

If I understand correctly, this is approximately how I should produce an output:

expositionFormats.findWriter(accept)
    .write(System.out, registry.scrape(), EscapingScheme.fromAcceptHeader(accept));

The problem with this is that the API forces me to pass the accept header twice, so theoretically I can do this:

expositionFormats.findWriter(acceptHeaderOne)
    .write(System.out, registry.scrape(), EscapingScheme.fromAcceptHeader(acceptHeaderTwo));

Which can lead to inconsistencies, it is easy to misuse the API.
I'm wondering if something like this would make sense:

expositionFormats.findWriter(accept).write(System.out, registry.scrape());

and the writer would have the EscapingScheme.
The writer still can be cached but it would be a little more than today.

主要言語
Java
スター
2.3k
フォーク
833
平均マージ
2日 16時間
マージ済み PR(30日)
86

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

prometheus/client_java のほかの issue

prometheus/client_java の issue をすべて見る

似ている issue

Java の issue をもっと見る

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

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