microsoft / microsoft/OpenAPI.NET.OData
POST actions to insert new entity has empty parameters
Nessuno ha ancora preso questa issue.
- Lingua principale
- C#
- Stelle
- 240
- Fork
- 70
- Merge medio
- 7h 59m
- PR unite (30g)
- 13
Descrizione
I'm using version 2.0.0-preview.15 and when I generate the OpenAPI document from my OData metadata file all the POST actions to insert a new entity have no parameters (thus no schema).
I've tried manually adding InsertRestrictions vocabulary and setting the value to true and that didn't seem to help. I tried this on the EntitySet and on the Entity itself
Here is an example of my metadata
<EntitySet Name="Products" EntityType="Product">
<Annotation Term="Org.OData.Capabilities.V1.InsertRestrictions">
<Record>
<PropertyValue Property="NonInsertableProperties">
<Collection>
<String>ID</String>
</Collection>
</PropertyValue>
</Record>
</Annotation>
</EntitySet>
Then the resulting OpenAPI schema generated
"post": {
"tags": [
"Products.Product"
],
"summary": "Add new entity to Products",
"operationId": "Products.Product.CreateProduct",
"requestBody": {
"description": "New entity",
"content": {
"application/json": { }
},
"required": true
},
Am I missing something in the OpenApiConvertSettings? Is this a known issue? Thank you
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.
Direzione di ricerca
Non sono specificati file sorgente, test o punto di ingresso. Riproduci il problema con i metadati OData e la versione forniti, quindi esamina OpenApiConvertSettings e il corpo della richiesta POST generato; il lavoro è completato quando il contenuto application/json generato include lo schema dell’entità previsto rispettando NonInsertableProperties.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- csharp, openapi
- Ambito
- api
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 30/100