@techreport{oai:ipsj.ixsq.nii.ac.jp:00224256, author = {鳴海, 秀人 and 岩井, 将行 and Hideto, Narumi and Masayuki, Iwai}, issue = {30}, month = {Feb}, note = {IoT システム開発や Web アプリケーション開発において,端末間の通信は不可欠であり,通信の機能を持つソフトウェアの開発では,通信の指定ミスによるバグがよく発生する.そこで,definy RPC という DenoのTypeScript で作られたライブラリを開発した.HTTP 通信を使ってデータをやりとりするときに使用できる.definy RPC を使用して作成した HTTP サーバーには,Web ブラウザで開くことができるエディタが設定なしに用意される.エディタで公開されている API を確認し,リクエストすることができる.definy RPC は,既存の技術である OpenAPI,GraphQL よりも簡単に型安全な実装をすることができ,ジェネリクス,Set,Map にも対応している.また,definy RPC を使用することで,API を呼ぶコードと定義した型の TypeScript のコードも生成することができる.これにより,指定ミスを防ぎ,バグの少ないソフトウェアを開発することができる.definy RPC を使用することで,Node-RED から呼ぶことができる @definy/node-red ライブラリも開発した.@definy/node-red では definy RPC で公開されている関数に合わせたノードが自動的に生成されるため,パラメーターの指定ミスを防ぐことができる., In IoT system development and web application development, communication between terminals is indispensable, and in the development of software with communication functions, bugs often occur due to communication specification errors. Therefore, we developed a library called definy RPC, which is written in Deno's TypeScript and can be used for exchanging data via HTTP communication. The HTTP server created using definy RPC will have an editor that can be opened in a Web browser without any configuration. The editor can be used to check and request public APIs. definy RPC is easier to implement type-safely than existing technologies such as OpenAPI and GraphQL, and supports generics, Sets, and Maps. Using definy RPC, it is also possible to generate TypeScript code of the defined type along with the code that calls the API. We have also developed the @definy/node-red library, which can be called from Node-RED by using @definy RPC. The @definy/node-red library automatically generates nodes for the functions published in @definy RPC, preventing parameter specification errors.}, title = {definy RPC: 型安全なHTTP通信のためのTypeScriptとNode-REDのライブラリ}, year = {2023} }