gawati / gawati-data

Gawati Data server is a component of the Gawati application a legal data exchange platform
Other
2 stars 0 forks source link

services and services-json have services with identical signatures #18

Closed kohsah closed 6 years ago

kohsah commented 6 years ago

There are these 2 services in services-json:


declare
    %rest:POST("{$json}")
    %rest:path("/gw/doc/exists")
    %rest:produces("application/json")
    %output:media-type("application/json")  
    %output:method("json")
function services-json:exists-xml($json) {
        services:exists-xml($json)
};

declare
    %rest:POST("{$json}")
    %rest:path("/gw/doc/sync")
    %rest:produces("application/json")
    %output:media-type("application/json")  
    %output:method("json")
function services-json:sync-xml($json) {
        services:sync-xml($json)
};

they have identical signatures to services in services.xql.

We cannot have 2 services with the same signature as it corrupts the restxq service stack.

services in services-json which are just json equivalents of services.xql need to ALWAYS end with json to avoid such problems.

The above need to become /gw/doc/sync/json and /gw/doc/exists/json