Skip to content

POST actions to insert new entity has empty parameters #707

@chrisouten-ch

Description

@chrisouten-ch

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions