Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions core/specs/smarkets/Smarkets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2562,6 +2562,7 @@ paths:
- CFTC
- DGA
- IGC
- IRGC
- MGA
- SGA
- UKGC
Expand Down Expand Up @@ -3046,6 +3047,7 @@ paths:
- CFTC
- DGA
- IGC
- IRGC
- MGA
- SGA
- UKGC
Expand Down Expand Up @@ -5786,6 +5788,7 @@ paths:
- CFTC
- DGA
- IGC
- IRGC
- MGA
- SGA
- UKGC
Expand Down
20 changes: 20 additions & 0 deletions core/test/pipeline/smarkets-jurisdiction-spec.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import fs from 'fs';
import path from 'path';
import yaml from 'js-yaml';

test('Smarkets non-event jurisdiction parameters include IRGC', () => {
const specPath = path.join(__dirname, '../../specs/smarkets/Smarkets.yaml');
const spec = yaml.safeLoad(fs.readFileSync(specPath, 'utf8')) as any;
const endpoints = [
'/v3/events/{event_ids}/markets/',
'/v3/events/{event_ids}/markets_count/',
'/v3/markets/{market_ids}/contracts/',
];

for (const endpoint of endpoints) {
const jurisdiction = spec.paths[endpoint].get.parameters.find(
(parameter: any) => parameter.in === 'query' && parameter.name === 'jurisdiction',
);
expect(jurisdiction.schema.enum).toContain('IRGC');
}
});