POST actions to insert new entity has empty parameters
还没有人认领这个 Issue。
评估
调研方向
未指定源文件、测试或入口点。使用提供的 OData 元数据和版本重现问题,然后检查 OpenApiConvertSettings 和生成的 POST 请求正文;当生成的 application/json 内容包含预期的实体架构,同时遵循 NonInsertableProperties 时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
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
- 主要语言
- C#
- 星标
- 240
- 派生
- 70
- 平均合并
- 7 小时 59 分钟
- 30 天内合并 PR
- 13
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/OpenAPI.NET.OData 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
microsoft/OpenAPI.NET.OData#661 ·
-
难度 3/5 1-2 天 新手友好度 58/100
microsoft/OpenAPI.NET.OData#852 ·
-
难度 4/5 3-5 天 新手友好度 45/100
microsoft/OpenAPI.NET.OData#833 ·
-
status:needs-more-information
难度 4/5 3-5 天 新手友好度 42/100
microsoft/OpenAPI.NET.OData#723 · 1 条评论 · 1 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 45/100
microsoft/OpenAPI.NET.OData#720 ·
查看 microsoft/OpenAPI.NET.OData 的全部 Issue
相似的 Issue
-
bug
难度 1/5 1 小时以内 新手友好度 90/100
-
Type: enhancement
难度 2/5 1-3 小时 新手友好度 65/100
apache/arrow-adbc#4809 ·
-
type/automation type/tech-debt
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 65/100
microsoft/vscode-azurefunctions#5197 · 1 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 85/100
microsoft/microsoft-ui-reactor#1274 ·