Custom type and deserialization into this type
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- openapi, typescript
調査の方向性
Start with the OpenAPI schema snippet and the generated TypeScript output described in the issue, then trace how custom format values are currently represented and how fetched responses are deserialized. Done should define how a custom format maps to an imported TypeScript type and how runtime responses are converted into that type, including the required configuration and tests.
索引モデルが issue の本文から書いたものです。
説明
Is there a way to use a custom types in the schema file? And deserialize from string into this type at runtime?
I have the OpenAPI spec like this (just a snippet):
{
"components": {
"schemas": {
"SomeModel": {
"type": "object",
"properties": {
"someProperty": {
"type": "string",
"format": "MyCustomType"
}
}
}
}
}
}
Which will generate this into the schema file:
export type SomeModel = {
/**
* @format MyCustomType
*/
someProperty: string;
}
But I want to have it like this:
import {MyCustomType} from 'some-library';
export type SomeModel = {
someProperty: MyCustomType;
}
And deserializing the fetched response during runtime into the MyCustomType
- 主要言語
- TypeScript
- スター
- 634
- フォーク
- 83
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
fabien0102/openapi-codegen のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
fabien0102/openapi-codegen#343 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
fabien0102/openapi-codegen#342 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
fabien0102/openapi-codegen#356 ·
-
update dependencies & removed unused deprecated対応中かも @el-j が 2 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
fabien0102/openapi-codegen#354 ·
-
deepMerge mutates its arguments, corrupting request payloads across calls対応中かも @richard-willis-chevin が 46 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
fabien0102/openapi-codegen#349 ·
fabien0102/openapi-codegen の issue をすべて見る
似ている issue
-
[Bug]: Server git tests sign fixture commits with the developer's key when run from the repo rootオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
melgarafael/DeskcommCRM#2657 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
MystenLabs/MemWal#1163 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
"Explore the letters"-button should read "Explore the papers"対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンMondriaan
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
knaw-huc/textannoviz#709 ·
メンテナーはふだん 1 日以内に返信
-
billion-context-pi
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
ranxianglei/billion-context#2521 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信