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

Fix beta Security OpenAPI schemas generating undefined C# types

Aperta
#3,708 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Tranquilla
Stack tecnologico
csharp, openapi, powershell
Ambito
api, tooling

Direzione di ricerca

Inizia individuando le trasformazioni OpenAPI di origine per gli schemi securityCopilot.prompt.inputs e detectionAction.responseActions, quindi confrontale con la rappresentazione di oggetti in formato libero supportata dal generatore. Rigenera e compila il modulo beta Security per confermare la validità dei tipi C#, quindi rimuovi le direttive temporanee per la rimozione delle proprietà da src/Security/Security.md.

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

Descrizione

Problem

The refreshed beta Security OpenAPI document contains two free-form object schemas that AutoREST.PowerShell generates as the invalid C# type undefined.undefined:

  1. microsoft.graph.security.securityCopilot.prompt.inputs
    • References microsoft.graph.Dictionary.
    • microsoft.graph.Dictionary is defined as type: object with additionalProperties: { type: object }.
  2. microsoft.graph.security.detectionAction.responseActions[]
    • References microsoft.graph.security.responseAction.
    • microsoft.graph.security.responseAction is an empty type: object with additionalProperties: { type: object }.

The generated beta Security module fails C# compilation with errors such as:

error CS0246: The type or namespace name 'undefined' could not be found

Affected generated models include:

  • MicrosoftGraphSecurityCopilotPrompt
  • MicrosoftGraphSecurityDetectionAction

Required OpenAPI correction

Update these schemas to use concrete, generator-supported types. If these values are intentionally arbitrary JSON, model them using the supported free-form object representation rather than an object whose values are themselves untyped objects. The exact schema should reflect the API contract for:

  • Security Copilot prompt input values
  • Custom detection response actions

Temporary SDK workaround

PR #3701 removes only these two properties from AutoREST's in-memory OpenAPI document using directives in src/Security/Security.md:

  • microsoft.graph.security.securityCopilot.prompt.inputs
  • microsoft.graph.security.detectionAction.responseActions

This preserves the associated endpoints and other model properties while allowing beta Security generation and compilation to complete.

Completion criteria

  • Correct both schemas in the source OpenAPI transforms.
  • Confirm AutoREST.PowerShell generates valid C# types for both properties.
  • Remove the temporary property-removal directives from src/Security/Security.md.
  • Regenerate and build the beta Security module successfully.

Related: #3701

Lingua principale
C#
Stelle
902
Fork
233
Merge medio
1g 20h
PR unite (30g)
30

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 microsoftgraph/msgraph-sdk-powershell

Tutte le issue di microsoftgraph/msgraph-sdk-powershell

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.