Fix conflictual query execution endpoint-resolution when query name is 'aql'

Description

:

Checking the Queyr API iI found we have:

Execute stored query: POST /query/{qualified_query_name}/{version}

with optional {version}

https://specifications.openehr.org/releases/ITS-REST/latest/query.html#query-execute-query-post-1

And Execute ad-hoc query: POST /query/aql

https://specifications.openehr.org/releases/ITS-REST/latest/query.html#query-execute-query-post 1

The issue is: the second is a special case of the first one, when the {quelified_name} is aql and {version} is not present.

How does a server differentiate one from the other? The first idea is because the stored query execution doesn’t have a body, which IMO is a little obscure. Personally I would suggest both endpoints don’t have overlapping cases, for instance, having a different paths for ad-hoc and stored queries.

see https://discourse.openehr.org/t/query-api-possible-issue/765

Reporter

Sebastian Iancu

Raised By

Pablo Pazos

Components

Affects versions

Configure