HyperCatIoT / hc2-server

HyperCat 2.0 reference server
Apache License 2.0
5 stars 5 forks source link

geobound required parameters? #2

Open smulube opened 9 years ago

smulube commented 9 years ago

I was interested to see testcases for geobound search requests where just a single geobound parameter is supplied, e.g.

it("should work with geobound-minlat only", function() {
       return chai.request(settings.getBaseURL())
            .get(catUrl + '&geobound-minlat=50.1242')
            .then(function(res) {
                res.body.should.have.property('items').which.has.length(1);
            });
    });

However there was this line in the specification document:

Where a geographic search request is performed, the client shall include the query parameters set out in Table 14

I'd taken this to mean that for a geobound search all four parameters were required (i.e. geobound-minlong, geobound-maxlong, geobound-minlat and geobound-maxlat), and the server should return an error of some sort?

tobyjaffey commented 9 years ago

Yes, I agree. A geobound search without all parameters should be considered invalid. We need a test for this.