[Feature Request]: Provide public default initializers for public structs

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

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
swift
領域
api

調査の方向性

Start by locating the generated model for ComAtprotoLexicon.Server.CreateSessionRequestBody and checking how its initializer access level is defined. Look for other public structs with public initializers to understand the project’s pattern. Done means callers can construct the requested public model with the fields shown in the example; the issue does not identify a test or broader model generation entry point.

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

説明

new feature
Summary

Public structs do not have public initializers

Pain points

I wanted to use the struct ComAtprotoLexicon.Server.CreateSessionRequestBody but I am unable to instantiate it.

'ComAtprotoLexicon.Server.CreateSessionRequestBody' initializer is inaccessible due to 'internal' protection level

would it be possible to update the models to have public initializers?

Considered Alternatives

None!

Is this a breaking change?

Yes

Library Examples

self.payload = .init(identifier: username, password: password, authFactorToken: authFactorToken)

Additional Context

No response

主要言語
Swift
スター
226
フォーク
40
平均マージ
5時間 8分
マージ済み PR(30日)
3

環境構築

はじめの一歩

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

MasterJ93/ATProtoKit のほかの issue

MasterJ93/ATProtoKit の issue をすべて見る

似ている issue

Swift の issue をもっと見る

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

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