diff --git a/core/specs/smarkets/Smarkets.yaml b/core/specs/smarkets/Smarkets.yaml index 0489adfb..d0c50020 100644 --- a/core/specs/smarkets/Smarkets.yaml +++ b/core/specs/smarkets/Smarkets.yaml @@ -2562,6 +2562,7 @@ paths: - CFTC - DGA - IGC + - IRGC - MGA - SGA - UKGC @@ -3046,6 +3047,7 @@ paths: - CFTC - DGA - IGC + - IRGC - MGA - SGA - UKGC @@ -5786,6 +5788,7 @@ paths: - CFTC - DGA - IGC + - IRGC - MGA - SGA - UKGC diff --git a/core/test/pipeline/smarkets-jurisdiction-spec.test.ts b/core/test/pipeline/smarkets-jurisdiction-spec.test.ts new file mode 100644 index 00000000..5169a453 --- /dev/null +++ b/core/test/pipeline/smarkets-jurisdiction-spec.test.ts @@ -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'); + } +});