Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Android Management API (androidmanagement v1): generated TS types missing googleAuthenticationOptions on EnrollmentToken and SigninDetail

Aperta
#3,927 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
76/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Tranquilla
Stack tecnologico
typescript
Ambito
api

Direzione di ricerca

Inizia da discovery/androidmanagement-v1.json e confrontalo con il documento Discovery live di Android Management API v1, quindi esamina src/apis/androidmanagement/v1.ts e il file generato build/v1.d.ts. Aggiorna lo snapshot Discovery e riesegui il generatore; il lavoro è completato quando nei tipi generati compaiono sia gli schemi mancanti sia le due proprietà di googleAuthenticationOptions.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Summary

The generated TypeScript types for the Android Management API (androidmanagement, version v1) are missing the googleAuthenticationOptions field and its backing schemas. These exist in the live Discovery document but not in the checked-in discovery snapshot, so the generated Schema$* interfaces are out of date.

Package / source

  • Split package: @googleapis/[email protected] (current latest)
  • Also affects googleapis (aggregate) — both are generated from src/apis/androidmanagement/v1.ts in this repo.

What is missing

In src/apis/androidmanagement/v1.ts (and the published build/v1.d.ts):

  1. Schema$EnrollmentToken is missing the property googleAuthenticationOptions?: Schema$GoogleAuthenticationOptions.
  2. Schema$SigninDetail is missing the property googleAuthenticationOptions?: Schema$SigninDetailGoogleAuthenticationOptions.
  3. The interface Schema$GoogleAuthenticationOptions is not generated at all (fields: authenticationRequirement enum AUTHENTICATION_REQUIREMENT_UNSPECIFIED | OPTIONAL | REQUIRED, requiredAccountEmail string).
  4. The interface Schema$SigninDetailGoogleAuthenticationOptions is not generated at all (field: authenticationRequirement, same enum).

The only existing reference is a prose mention in the Schema$GoogleAuthenticationSettings description ("This value is overridden by EnrollmentToken.googleAuthenticationOptions and SigninDetail.googleAuthenticationOptions…"); the actual typed fields/schemas are absent.

Affected endpoints

  • androidmanagement.enterprises.enrollmentTokens.create — requestBody is Schema$EnrollmentToken; callers cannot set googleAuthenticationOptions without a type cast.
  • androidmanagement.enterprises.create / androidmanagement.enterprises.patch — Schema$Enterprise.signinDetails[] is Schema$SigninDetail, which lacks googleAuthenticationOptions.

Evidence

Live Discovery document (revision: 20260618):
https://androidmanagement.googleapis.com/$discovery/rest?version=v1

// schemas.EnrollmentToken.properties.googleAuthenticationOptions
{ "description": "Optional. Options related to Google authentication during the enrollment.", "$ref": "GoogleAuthenticationOptions" }

// schemas.SigninDetail.properties.googleAuthenticationOptions
{ "description": "Optional. Options related to Google authentication during the enrollment.", "$ref": "SigninDetailGoogleAuthenticationOptions" }

// schemas.GoogleAuthenticationOptions
{ "id": "GoogleAuthenticationOptions", "type": "object",
  "properties": {
    "authenticationRequirement": { "type": "string", "enum": ["AUTHENTICATION_REQUIREMENT_UNSPECIFIED","OPTIONAL","REQUIRED"] },
    "requiredAccountEmail": { "type": "string" }
  } }

// schemas.SigninDetailGoogleAuthenticationOptions
{ "id": "SigninDetailGoogleAuthenticationOptions", "type": "object",
  "properties": {
    "authenticationRequirement": { "type": "string", "enum": ["AUTHENTICATION_REQUIREMENT_UNSPECIFIED","OPTIONAL","REQUIRED"] }
  } }

The checked-in discovery/androidmanagement-v1.json on main does not contain any of the above (verified: all four are absent), which is why the generated types are stale.

Root cause / suggested fix

The repo's checked-in androidmanagement v1 discovery snapshot is out of date relative to the live Discovery doc. Refreshing the discovery document and re-running the generator should produce Schema$GoogleAuthenticationOptions, Schema$SigninDetailGoogleAuthenticationOptions, and the two missing properties.

Expected vs. actual

  • Expected: Schema$EnrollmentToken.googleAuthenticationOptions and Schema$SigninDetail.googleAuthenticationOptions are typed, matching the live Discovery doc.
  • Actual: Both properties and both schema interfaces are absent; consumers must cast (as) to send the field, even though the REST API accepts and honors it.
Lingua principale
TypeScript
Stelle
12.3k
Fork
2k
Merge medio
1g 19h
PR unite (30g)
21

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di googleapis/google-api-nodejs-client

Tutte le issue di googleapis/google-api-nodejs-client

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.