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

Abierto
#216 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
swift
Área
api

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
Swift
Estrellas
226
Forks
40
Merge medio
5 h 8 min
PR fusionados (30 d)
3

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de MasterJ93/ATProtoKit

Todos los issues de MasterJ93/ATProtoKit

Issues similares

Más issues de Swift

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.