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

Typed input and output

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
ruby

調査の方向性

lib/temporal/concerns/typed.rb の 22 行目から始め、activities と workflows が現在どのように入力と出力のシリアライゼーションを処理しているかを確認してください。この issue では、再利用可能な dry-struct バリデーション、型付き出力、workflow のアクティベーション前のバリデーションについて、合意されたアプローチが必要です。完了条件には、定義された API と各動作のテストを含める必要があります。

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

説明

Hi! I am trying to get rid of JSON.parse(input) and JSON.dump(output) in activities/workflows and wanted to define Input and Output classes with dry-struct to define the structure.

Then I found this line in https://github.com/coinbase/temporal-ruby/blob/master/lib/temporal/concerns/typed.rb#L22

unless klass.is_a?(Dry::Types::Type)

Now I am stuck on how to make reusable structs with validation for workflow/activity params. I have three questions:

  1. Does it make sense to change condition in typed.rb to allow dry structs?
  2. How I can add typed output, so I don't need to serialize and deserialize outputs multiple time?
  3. Any best practices to validate inputs before activating the workflow?

Any ideas how to solve this?

主要言語
Ruby
スター
288
フォーク
113
平均マージ
10日 15時間
マージ済み PR(30日)
2

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

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

はじめの一歩

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

coinbase/temporal-ruby のほかの issue

coinbase/temporal-ruby の issue をすべて見る

似ている issue

Ruby の issue をもっと見る

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

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