Android Management API (androidmanagement v1): generated TS types missing googleAuthenticationOptions on EnrollmentToken and SigninDetail
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 76/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 冷清
- 技术栈
- typescript
- 领域
- api
调研方向
从 discovery/androidmanagement-v1.json 开始,将其与实时的 Android Management API v1 Discovery 文档进行比较,然后检查 src/apis/androidmanagement/v1.ts 和生成的 build/v1.d.ts。刷新 Discovery 快照并重新运行生成器;当缺失的 schema 以及 googleAuthenticationOptions 的两个属性都出现在生成的类型中时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
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](currentlatest) - Also affects
googleapis(aggregate) — both are generated fromsrc/apis/androidmanagement/v1.tsin this repo.
What is missing
In src/apis/androidmanagement/v1.ts (and the published build/v1.d.ts):
Schema$EnrollmentTokenis missing the propertygoogleAuthenticationOptions?: Schema$GoogleAuthenticationOptions.Schema$SigninDetailis missing the propertygoogleAuthenticationOptions?: Schema$SigninDetailGoogleAuthenticationOptions.- The interface
Schema$GoogleAuthenticationOptionsis not generated at all (fields:authenticationRequirementenumAUTHENTICATION_REQUIREMENT_UNSPECIFIED | OPTIONAL | REQUIRED,requiredAccountEmailstring). - The interface
Schema$SigninDetailGoogleAuthenticationOptionsis 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—requestBodyisSchema$EnrollmentToken; callers cannot setgoogleAuthenticationOptionswithout a type cast.androidmanagement.enterprises.create/androidmanagement.enterprises.patch—Schema$Enterprise.signinDetails[]isSchema$SigninDetail, which lacksgoogleAuthenticationOptions.
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.googleAuthenticationOptionsandSchema$SigninDetail.googleAuthenticationOptionsare 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.
- 主要语言
- TypeScript
- 星标
- 12.3k
- 派生
- 2k
- 平均合并
- 1 天 19 小时
- 30 天内合并 PR
- 21
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
googleapis/google-api-nodejs-client 的其他 Issue
-
难度 5/5 一周以上 新手友好度 32/100
googleapis/google-api-nodejs-client#3932 · 1 条评论 ·
维护者通常 1 天内回复
-
[Discovery Engine] streamAnswer is typed as one AnswerQueryResponse, but REST returns frame arrays未关闭
难度 3/5 1-2 天 新手友好度 64/100
googleapis/google-api-nodejs-client#3930 ·
维护者通常 1 天内回复
-
size: l type: feature request
难度 4/5 3-5 天 新手友好度 35/100
googleapis/google-api-nodejs-client#3926 ·
维护者通常 1 天内回复
-
type: feature request
难度 5/5 一周以上 新手友好度 15/100
googleapis/google-api-nodejs-client#3903 ·
维护者通常 1 天内回复
-
If a service is deprecated and its the last version fo the library, we need to fully deprecate it未关闭type: process
难度 4/5 3-5 天 新手友好度 42/100
googleapis/google-api-nodejs-client#3898 ·
维护者通常 1 天内回复
查看 googleapis/google-api-nodejs-client 的全部 Issue
相似的 Issue
-
refactor
难度 2/5 半天 新手友好度 84/100
维护者通常 5 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
OHDSI/Data2Evidence#3450 ·
维护者通常 2 天内回复
-
e2e-failure ready-to-code
难度 2/5 1-3 小时 新手友好度 90/100
redhat-developer/rhdh-plugin-export-overlays#4011 · 1 条评论 ·
维护者通常 1 天内回复
-
automation missing-model model-sync provider:ofox
难度 2/5 1-3 小时 新手友好度 72/100
anomalyco/models.dev#8421 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复