elasticio / odata2openapi

OData to OpenAPI Converter
https://www.elastic.io
MIT License
33 stars 23 forks source link

NavigationProperty not converted to JSONSchema #35

Open dk8ChrHu opened 5 years ago

dk8ChrHu commented 5 years ago

I have an entity with a navigation property

<EntityType Name="Design">
  <Key>
    <PropertyRef Name="Designid"/>
  </Key>
  <Property Name="Designid" Type="Edm.String" Nullable="false" Nullable="false"/>
  <NavigationProperty Name="toConstruction" Relationship="YTIP.DesignConstruction" FromRole="FromRole_DesignConstruction" ToRole="ToRole_DesignConstruction"/>
</EntityType>

This navigation property toConstruction is not added as a property to the JSONSchema

"YTIP.Design": {
      "type": "object",
      "properties": {
        "Designid": {
          "type": "string"
        },
      "required": [
        "Designid"
      ]
    }
mengugu commented 4 years ago

Hi, I had the same problem, I replaced the Relationship="..."by Type="..." in my XML OData file, it solved it