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

Incorrect parameters spec for -get-person #23

Open
kelvinqian00 opened this issue May 20, 2021 · 5 comments
Open

Incorrect parameters spec for -get-person #23

kelvinqian00 opened this issue May 20, 2021 · 5 comments
Assignees

Comments

@kelvinqian00
Copy link
Contributor

kelvinqian00 commented May 20, 2021

The following is the current params spec for get-person:

(s/def ::get-person-params 
  (sc/with-conform-gen :xapi.agents.GET.request/params))

However, this is incorrect, since this is simply the spec for statement resource queries, not agent resource queries. In the former, agent is an optional parameter, but in the latter, agent is required. Therefore, during generative testing, -get-person would receive missing agent values, causing unnecessary errors.

EDIT: I likely used these specs wrong in lrsql and incorrectly determined the source of the issue. The followup comment still stands, however.

@kelvinqian00
Copy link
Contributor Author

kelvinqian00 commented May 20, 2021

Note: there are the following specs in xapi-schema:

(s/def :xapi.common.param/agent
  (json (s/nonconforming ::xs/actor)))

(s/def :xapi.statements.GET.request.params/agent 
  :xapi.common.param/agent)

(s/def :xapi.agents.GET.request.params/agent 
  :xapi.document.param/agent)

however these do not work as ::xs/actor covers Anonymous Groups, which do not have IFIs.

@milt
Copy link
Member

milt commented May 20, 2021

this is simply the spec for statement resource queries

I don't get it, it says :xapi.agents.GET.request/params. did you mean state?

@kelvinqian00
Copy link
Contributor Author

Oh I see what you mean. My mistake I thought ::get-person-params used :xapi.statements.GET.request/params. Still, the point in my followup comment stands.

@milt
Copy link
Member

milt commented May 20, 2021

Yep, that last bit seems correct, it should be changed to agent specifically. Make a PR on xapi-schema for that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants