Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support complex type with navigation property #15

Closed
xuzhg opened this issue Sep 20, 2018 · 5 comments · Fixed by #158
Closed

Support complex type with navigation property #15

xuzhg opened this issue Sep 20, 2018 · 5 comments · Fixed by #158
Assignees
Labels
fixed type:enhancement Enhancement request targeting an existing experience.
Milestone

Comments

@xuzhg
Copy link
Contributor

xuzhg commented Sep 20, 2018

Do we support the navigation property in complex type?

For example:

Entity Type (AddressInfo)
  |- ID (Edm.Int32)

Complex Type (Address)
    |- City (Edm.String)
    |- Street (Edm.String)
    |- AddressInfo (AddressInfo)

Entity Type (Customer)
   -> ID (Edm.Int32)
   -> Location (Address)
   -> Locations (Collection(Address))

EntitySet (Customers -> Customer)

So, the path:

~/Customers/{ID}/Location/AddressInfo should be valid.
~/Customers/{ID}/Locations/AddressInfo should be invalid.

@baywet baywet added the type:enhancement Enhancement request targeting an existing experience. label Nov 23, 2021
@darrelmiller
Copy link
Member

Now that this is supported in Microsoft Graph AGS, we should add this capability. I expect teams to start using it soon.

@baywet baywet added this to the 1.0.10 milestone Dec 15, 2021
@baywet baywet self-assigned this Dec 15, 2021
@baywet
Copy link
Member

baywet commented Jan 4, 2022

Note: in the provided example ~/Customers/{id}/Location should also be valid, but the conversion lib should already handle it today, we should double check though while we're at it.

@baywet
Copy link
Member

baywet commented Jan 6, 2022

update, after some testing, it appears that the current conversion process also doesn't produce anything for ~/Customers/{id}/Location when it should. For example TripService doesn't have any path item for Airports/{id}/Location.

Additionally, this behavior should be driven by the existing EnableNavigationPropertyPath conversion setting.

@baywet
Copy link
Member

baywet commented Jan 7, 2022

After internal discussions with @mikepizzo here are some additional precisions for the operations:

~/Customers/{id}/Location:

  • GET
  • PATCH
  • DELETE (if the property is nullable)

~/Customers/{ID}/Location/AddressInfo

  • GET
  • PATCH
  • DELETE (if the property is nullable)

(NavigationPropertyRestrictions apply)

~/Customers/{ID}/Location/AddressInfos (assuming we have a collection instead)

  • GET (list)
  • POST (inserting)

(NavigationPropertyRestrictions apply)

~/Customers/{ID}/Location/AddressInfos/{id} (assuming we have a collection instead)

  • GET
  • PATCH
  • DELETE

(NavigationPropertyRestrictions apply)

Awaiting additional information on the behavior of ContainsTarget ($ref etc...)

@baywet
Copy link
Member

baywet commented Jan 7, 2022

ContainsTarget semantically behaves the same way as a navigation property on an entity type, additionally

~/Customers/{id}/Locations: (assuming they are a collection of complex types)

  • GET (lists the collection)
  • POST (replace the whole collection)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed type:enhancement Enhancement request targeting an existing experience.
Projects
None yet
3 participants