Post/Patch/Delete Paths not generated for type casts
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 54/100
Direzione di ricerca
Inizia con src/Microsoft.OpenApi.OData.Reader/PathItem/ODataTypeCastPathItemHandler.cs, in particolare con la gestione dei percorsi di cast di tipo a cui fa riferimento l'issue. Riproduci il caso con la classe base A, la classe derivata B e RequireDerivedTypesConstraintForODataTypeCastSegments impostato su false. Il lavoro è completato quando i percorsi generati per il tipo sottoposto a cast includono POST, PATCH e DELETE oltre a GET.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
When generating an OpenAPI specification of the OData model, it does not generate the post/patch/delete paths for the type cast entities. In my example (see below) CreateJiraIssue is derived from Widget. But it does not generate the paths for post/patch/delete
OData supports post/patch/delete for the cast types! It works when you do an patch request to the correct url. It is also described here:
https://learn.microsoft.com/en-us/odata/webapi-8/fundamentals/entity-routing?tabs=net60%2Cvisual-studio
Assemblies affected
Microsoft.OpenApi.OData (1.6.3)
Steps to reproduce
Create a class A and a derived class B. Add class A as entity set to the odata model.
In the converter settings you need to set RequireDerivedTypesConstraintForODataTypeCastSegments to false.
Expected result
The post/patch/delete paths would be generated for all derived (cast) types.
Actual result
Only the get paths are generated for derived (class) types.
Additional detail
I looked into the code and I have an idea where this is coming from.
The ODataTypeCastPathItemHandler will be used for the path (because of the type cast kind). And there only the Get operation will be set:
- 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à 3/5 1-2 giorni Idoneità per principianti 45/100
microsoft/OpenAPI.NET.OData#720 ·
Tutte le issue di microsoft/OpenAPI.NET.OData
Issue simili
-
type/automation type/tech-debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
t/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
ci-failure-cause test-failure
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
area:auth FE mvp P3
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
klasolsson81/jobbliggaren#1788 ·