Skip to content

Commit

Permalink
fix: adding back support for geojson as an output schema (#1042)
Browse files Browse the repository at this point in the history
FeatureServer should allow outputting geojson as a valid schema.
  • Loading branch information
brettmeyerowitz authored Jun 26, 2024
1 parent 94f01e3 commit 0445801
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/grumpy-boats-crash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@koopjs/featureserver': minor
---

Adding back support for geojson as an output schema
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const joi = require('joi');
const { sharedQueryParamSchema } = require('../helpers/shared-query-request-param-schema');

const formatSchema = joi.string().valid('json', 'pjson', 'pbf').default('json');
const formatSchema = joi.string().valid('json', 'pjson', 'pbf', 'geojson').default('json');

const spatialReferenceSchema = joi
.object({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe('validate-query-request-parameters', () => {
});
} catch (error) {
error.message.should.deepEqual('Invalid format');
error.details.should.deepEqual(['"f" must be one of [json, pjson, pbf]']);
error.details.should.deepEqual(['"f" must be one of [json, pjson, pbf, geojson]']);
error.code.should.equal(400);
}
});
Expand Down

0 comments on commit 0445801

Please sign in to comment.