Extension of Quarkus example with structured content mode
@matejvasek がすでに取り組んでいます。
2022年7月19日 から。
評価
この issue はまだ評価されていません。
説明
I like the Quarkus example.
However, it seems to use the Binary Content Mode. I however require the Structured Content Mode. Initially I did not even notice that the binary mode left out the metadata from the body. I did not even notice initially there were 2 modes.
It took me quite some time that all that's required is adding the annotation @Consumes( JsonFormat.CONTENT_TYPE ) to the client:
@Path( "/notify" )
@RegisterRestClient
public interface BrokerClient {
@POST
@Consumes( JsonFormat.CONTENT_TYPE )
void emit( CloudEvent event);
}
Will trigger sending the request in the Structured Content Mode.
Likewise adding a @Consumes( JsonFormat.CONTENT_TYPE ) to the server:
@POST
@Path( "notify" )
@Consumes( JsonFormat.CONTENT_TYPE )
public Response create( CloudEvent event ) {
// logic
}
Fixes the server part. All the more confusing is that this reference mentions the Quarkus example (while discussing the structured content mode).
Suggestion: update the README.md or extend the example.
- 主要言語
- Java
- スター
- 446
- フォーク
- 172
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
cloudevents/sdk-java のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
cloudevents/sdk-java#731 · リアクション 1 件 ·
-
bug
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
cloudevents/sdk-java#697 · コメント 3 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
cloudevents/sdk-java#689 · コメント 2 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
cloudevents/sdk-java#660 · コメント 2 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
cloudevents/sdk-java#711 · コメント 1 件 ·
cloudevents/sdk-java の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
checkstyle/test-configs#263 ·
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
apache/cloudstack#14222 ·
-
[BUG]茶杯方块在取茶时会引发崩溃 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
1.0.0-alpha2 Type/Improvement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
wso2/dpdp-accelerator#272 ·