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

Custom OData action for getting children by ID #426

Closed
kultsar opened this Issue Jul 25, 2018 · 4 comments

Comments

Projects
None yet
4 participants
@kultsar
Copy link

kultsar commented Jul 25, 2018

URL example /OData.svc/content(42)/children

  • Create a custom OData function that returns a collection of a content's children
  • The available OData options and the response should be the same as for the collection url of the same content
    Related PR: #429

Autofilters and lifespan filters are not working as expected at the moment - related issue: #428

@kultsar kultsar modified the milestones: Sprint 163, Sprint 164 Jul 25, 2018

@gallayl gallayl self-assigned this Jul 26, 2018

@tusmester tusmester added discussion and removed discussion labels Aug 2, 2018

@kultsar kultsar modified the milestones: Sprint 164, Sprint 165 Aug 8, 2018

@tusmester

This comment has been minimized.

Copy link
Member

tusmester commented Aug 13, 2018

@gallayl pls review.

@herflis herflis modified the milestones: Sprint 165, Sprint 166 Aug 22, 2018

@gallayl

This comment has been minimized.

Copy link
Contributor

gallayl commented Aug 30, 2018

  • If I $expand the Children reference, I've got all repository content in the response (/odata.svc/('Root')?$expand=Children). I think it should work with in an InFolder mode, the expanded field should reflect the same content collection as /odata.svc/('Root')/Children
  • However I can $select fields when calling /odata.svc/('Root')?$expand=Children&$select=Chilrden/Path, I cannot $select fields when I expand the Children reference, e.g. the following request throws an 500 error /odata.svc/('Root')?$expand=Children&$select=Chilrden/Path)
    The response:
{
  "error": {
    "code": "InvalidSelectParameter",
    "exceptiontype": "ODataException",
    "message": {
      "lang": "en-us",
      "value": "Bad item in $select: Chilrden/Path"
    },
    "innererror": null
  }
}

I think if the following problems cannot be solved in an easy way, we should deny expanding the Children reference for now, the action works fine in a separate request

@gallayl gallayl assigned tusmester and unassigned gallayl Aug 30, 2018

@tusmester

This comment has been minimized.

Copy link
Member

tusmester commented Aug 30, 2018

There is a typo in the request: Chilrden.

@gallayl

This comment has been minimized.

Copy link
Contributor

gallayl commented Aug 30, 2018

My bad. $select works 🎉 🍰 👍

@kultsar kultsar modified the milestones: Sprint 166, Sprint 167 Sep 5, 2018

@tusmester tusmester assigned gallayl and unassigned tusmester Sep 7, 2018

@kultsar kultsar closed this Sep 12, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment