AllenNeuralDynamics / AllenNeuralDynamics/one-liner

Attach json schema for Pydantic Models in `get_stream_configuration()`

オープン
#60 コメント 0 件 リアクション 0 件 担当者 1 名 @jessy-liao が担当を希望しています GitHub で見る
主要言語
Python
スター
3
フォーク
0
PR マージ指標
30日以内にマージされた PR はありません

説明

When we call `get_stream_configuration()`, we create a dict with metatdata related to each stream including the type. Type information is deduced from the connected function's return type. If the return type is a pydantic model, however, we return the string representation of that model since the client recipient can't deserialize it if it doesn't have the associated dependency required to understand the model.

What we should do instead is return a json schema associated with that model either *instead-of* or *in-addition-to* the annotated return type. Returning the json schema provides full information into a nested dictionary-like object, which means it's likely more detailed than, let's say, annotating a function's return type with just `dict`.

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

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

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

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