Action bound to abstract entity type is not present in OpenAPI output when using hidi to convert from CSDL
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- csharp, openapi
- Ambito
- api, backend-api-design
Direzione di ricerca
Riproduci il problema con il comando Hidi usando l’input CSDL referenziato e conversion-settings/openapi.json. Confronta lo YAML generato con le azioni astratte di protectionUnitBase e verifica se /offboard e /cancelOffboard sono assenti. Il lavoro è completato quando entrambi gli URI delle richieste compaiono nell’output OpenAPI.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
When generating the OpenAPI description for Microsoft Graph Beta the offboard and cancelOffboard routes are not generated for the protectionUnit entity
Reproduction Steps
In a PowerShell terminal with dotnet 9
dotnet tool install --global Microsoft.OpenApi.Hidi
git clone https://github.com/microsoftgraph/msgraph-metadata.git
hidi transform --csdl .\msgraph-metadata\clean_beta_metadata\cleanMetadata.xml --output .\beta-enhanced-restore.yaml --co --version "3.0" --metadata-version "beta" --log-level Trace --format yaml --settings-path .\msgraph-metadata\conversion-settings\openapi.json
Alternatively if you clone the internal AD-AggregatorService-Workloads you can use a smaller source csdl file:
hidi transform --csdl .\AD-AggregatorService-Workloads\Workloads\Microsoft.EnhancedRestore\override\schema-Prod-beta.csdl --output .\beta-enhanced-restore-3.1.yaml --co --version "3.1" --metadata-version "beta" --log-level Trace --format yaml
When opening the newly created beta-enhanced-restore.yaml you will not find a path that includes /cancelOffboard
When examining the smaller CSDL fragment for the Microsoft.EnhancedRestore I can see that the impacted Actions are all bound to an abstract type.
<EntityType Name="protectionUnitBase" BaseType="microsoft.graph.entity" Abstract="true" >
<Property Name="policyId" Type="Edm.String" />
<Property Name="status" Type="self.protectionUnitStatus" />
<Property Name="createdDateTime" Type="Edm.DateTimeOffset" />
<Property Name="createdBy" Type="microsoft.graph.identitySet" />
<Property Name="lastModifiedDateTime" Type="Edm.DateTimeOffset" />
<Property Name="lastModifiedBy" Type="microsoft.graph.identitySet" />
<Property Name="protectionSources" Type="self.protectionSource" Nullable="false" />
<Property Name="error" Type="microsoft.graph.publicError" />
<Property Name="offboardRequestedDateTime" Type="Edm.DateTimeOffset" />
</EntityType>
<EntityType Name="protectionRuleBase" BaseType="microsoft.graph.entity" Abstract="true" >
<Property Name="status" Type="self.protectionRuleStatus" />
<Property Name="createdDateTime" Type="Edm.DateTimeOffset" />
<Property Name="createdBy" Type="microsoft.graph.identitySet" />
<Property Name="lastModifiedDateTime" Type="Edm.DateTimeOffset" />
<Property Name="lastModifiedBy" Type="microsoft.graph.identitySet" />
<Property Name="error" Type="microsoft.graph.publicError" />
<Property Name="isAutoApplyEnabled" Type="Edm.Boolean" />
</EntityType>
<Action Name="run" IsBound="true">
<Parameter Name="bindingParameter" Type="self.protectionRuleBase"/>
<ReturnType Type="self.protectionRuleBase"/>
</Action>
<Action Name="deleteAndUnprotect" IsBound="true" >
<Parameter Name="bindingParameter" Type="self.protectionRuleBase"/>
<ReturnType Type="self.protectionRuleBase"/>
</Action>
<Action Name="offboard" IsBound="true">
<Parameter Name="bindingParameter" Type="self.protectionUnitBase"/>
<ReturnType Type="self.protectionUnitBase"/>
</Action>
<Action Name="cancelOffboard" IsBound="true" >
<Parameter Name="bindingParameter" Type="self.protectionUnitBase"/>
<ReturnType Type="self.protectionUnitBase"/>
</Action>
Expected behavior
the /offboard and /cancelOffboard request URIs are described in the OpenAPI output.
Additional context
This is an issue preventing the generated SDKs for Microsoft Graph from including these requests.
- Lingua principale
- C#
- Stelle
- 240
- Fork
- 70
- Merge medio
- 7h 59m
- PR unite (30g)
- 13
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoft/OpenAPI.NET.OData
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
microsoft/OpenAPI.NET.OData#661 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 58/100
microsoft/OpenAPI.NET.OData#852 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
microsoft/OpenAPI.NET.OData#833 ·
-
status:needs-more-information
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
microsoft/OpenAPI.NET.OData#723 · 1 commento · 1 reazione ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
microsoft/OpenAPI.NET.OData#710 · 2 commenti · 1 reazione ·
Tutte le issue di microsoft/OpenAPI.NET.OData
Issue simili
-
Status: Waiting triage Type: Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
nanoframework/Home#1857 ·
-
kind/bug kind/regression
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
unoplatform/uno.toolkit.ui#1646 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
nightscout/nocturne#1379 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
elastic/esql-dotnet#47 ·
-
port: add go-steam fork Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100