Action bound to abstract entity type is not present in OpenAPI output when using hidi to convert from CSDL
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 45/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Estagnada
- Stack de tecnologia
- csharp, openapi
- Domínio
- api, backend-api-design
Direção de pesquisa
Reproduza o problema com o comando Hidi usando a entrada CSDL referenciada e conversion-settings/openapi.json. Compare o YAML gerado com as ações abstratas de protectionUnitBase e verifique se /offboard e /cancelOffboard estão ausentes. Está concluído quando os dois URIs de solicitação aparecem na saída OpenAPI.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- C#
- Estrelas
- 240
- Forks
- 70
- Merge médio
- 2h 8min
- PRs com merge (30d)
- 9
Preparar o ambiente
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de microsoft/OpenAPI.NET.OData
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
microsoft/OpenAPI.NET.OData#661 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 58/100
microsoft/OpenAPI.NET.OData#852 · 1 comentário · 1 reação ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 45/100
microsoft/OpenAPI.NET.OData#833 ·
Mantenedores costumam responder em até 1 dia
-
status:needs-more-information
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 42/100
microsoft/OpenAPI.NET.OData#723 · 1 comentário · 1 reação ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 35/100
microsoft/OpenAPI.NET.OData#710 · 2 comentários · 1 reação ·
Mantenedores costumam responder em até 1 dia
Todas as issues de microsoft/OpenAPI.NET.OData
Issues semelhantes
-
Broken Text debugger displayAbertaneeds triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
spectreconsole/spectre.console#2221 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 92/100
-
area/navigationview 🧭 difficulty/starter 🚀 good first issue kind/bug platform/all project/navigation-lifecycle 🧬 triage/untriaged
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
unoplatform/uno#24925 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
PhilippC/keepass2android#3315 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
DamianEdwards/ghcp-spend-tray#39 ·
Mantenedores costumam responder em até 1 dia