Bug 52768 - Error in query parameter of Kelvin API prevents interactive user search
Summary: Error in query parameter of Kelvin API prevents interactive user search
Status: CLOSED FIXED
Alias: None
Product: UCS@school
Classification: Unclassified
Component: HTTP-API (Kelvin)
Version: UCS@school 4.4
Hardware: Other Linux
: P5 normal
Target Milestone: ---
Assignee: Daniel Tröder
QA Contact: Tobias Wenzel
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-11 11:39 CET by Daniel Tröder
Modified: 2021-02-23 09:29 CET (History)
1 user (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.069
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Customer ID:
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Tröder univentionstaff 2021-02-11 11:39:55 CET
The "SchoolUserRole" class is not in the schema and thus the Swagger UI does not allow to list/search users. The displayed error is:

---------------------------------------------------------------------
Resolver error at paths./ucsschool/kelvin/v1/users/.get.parameters.10.schema.items.$ref
Could not resolve reference: Could not resolve pointer: /definitions/SchoolUserRole does not exist in document
---------------------------------------------------------------------

My guess is, that this is referenced in:

------------------------------------------
async def search(
    ...
    roles: List[SchoolUserRole] = Query(None)
    ...
):
------------------------------------------

But "class SchoolUserRole(str, Enum)" from role.py is in the "Definitions" part of the schema.


Not being able to search for users using the Swagger UI does not impair the general API service for M2M, but it is a problem when using the API interactively.
Comment 1 Daniel Tröder univentionstaff 2021-02-12 13:23:57 CET
Turns out that the schema error is not responsible for the search problem.
The schema error remains. If working on it is desired, clone this bug.

This will now only fix the possibility to do interactive user searches.

[feature/kelvin 30915f743] Bug #52768: fix interactive user search
Comment 2 Tobias Wenzel univentionstaff 2021-02-15 16:12:31 CET
QA → All OK → VERIFY

Code → OK, trivial
behaviour in 1.2.0 before fix: GET /users → no users
behaviour in 1.3.0 before fix: GET /users → interactive user search is fixed 

Tests → passing
Comment 3 Daniel Tröder univentionstaff 2021-02-23 09:29:44 CET
A Kelvin API app with the changes in this bug has been published.