Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

[Schema Inaccuracy] Artifact.Id is missing `int64` format

Abierto Apto para principiantes
#7,266 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
1/5
Tiempo estimado
Menos de una hora
Aptitud para principiantes
88/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
openapi
Área
api

Línea de trabajo

Abre api.github.com.json y localiza la propiedad id del objeto artifact. Añade el formato int64 mostrado en el issue y, después, verifica que el esquema haga que los clientes generados utilicen un deserializador de 64 bits en lugar de un deserializador de enteros.

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

Descripción

Schema Inaccuracy

When I use Kiota to generate clients for the GitHub API, I get a deserialization error when retreiving artifacts through the API. The value for the Artifact.Id is simply too large and exceeds an Int32.

Expected

It should not result in deserialization errors.

Problem

In the api.github.com.json file, the Actor.Id is defined as:

      "artifact": {
        "title": "Artifact",
        "description": "An artifact",
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 5
          },

This makes Kiota belive that it can use an integer deserializer:

        public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
        {
            return new Dictionary<string, Action<IParseNode>>
            {
                { "archive_download_url", n => { ArchiveDownloadUrl = n.GetStringValue(); } },
                { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } },
                { "digest", n => { Digest = n.GetStringValue(); } },
                { "expired", n => { Expired = n.GetBoolValue(); } },
                { "expires_at", n => { ExpiresAt = n.GetDateTimeOffsetValue(); } },
--->            { "id", n => { Id = n.GetIntValue(); } },
                { "name", n => { Name = n.GetStringValue(); } },
                { "node_id", n => { NodeId = n.GetStringValue(); } },
                { "size_in_bytes", n => { SizeInBytes = n.GetIntValue(); } },
                { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } },
                { "url", n => { Url = n.GetStringValue(); } },
                { "workflow_run", n => { WorkflowRun = n.GetObjectValue<global::GitPackagesManager.ApiClient.Models.Artifact_workflow_run>(global::GitPackagesManager.ApiClient.Models.Artifact_workflow_run.CreateFromDiscriminatorValue); } },
            };
        }

If the Artifact.Id had been defined as

      "artifact": {
        "title": "Artifact",
        "description": "An artifact",
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 5,
            "format": "int64"
          },

the 'Id' line in the generated GetFieldDeserializers() method would use n.GetLongValue() instead of n.GetIntValue()

Lenguaje dominante
Sin datos de lenguaje
Estrellas
1.6k
Forks
345
Merge medio
6 h
PR fusionados (30 d)
82

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 github/rest-api-description

Todos los issues de github/rest-api-description

Issues similares

Más issues de Backend & API Design

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.