Skip to content

Commit 49178d8

Browse files
committed
feat(messages): added custom media type
1 parent 5e14259 commit 49178d8

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

javascript/src/messages.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ export class Source {
471471

472472
data: string = ''
473473

474-
mediaType: SourceMediaType = SourceMediaType.TEXT_X_CUCUMBER_GHERKIN_PLAIN
474+
mediaType: SourceMediaType | CustomMediaType = 'text/x.cucumber.gherkin+plain'
475475
}
476476

477477
export class SourceReference {
@@ -677,10 +677,9 @@ export enum PickleStepType {
677677
OUTCOME = 'Outcome',
678678
}
679679

680-
export enum SourceMediaType {
681-
TEXT_X_CUCUMBER_GHERKIN_PLAIN = 'text/x.cucumber.gherkin+plain',
682-
TEXT_X_CUCUMBER_GHERKIN_MARKDOWN = 'text/x.cucumber.gherkin+markdown',
683-
}
680+
export type BaseMediaType = 'text/x.cucumber.gherkin';
681+
export type CustomMediaType = `${BaseMediaType}+${string}`;
682+
export type SourceMediaType = 'text/x.cucumber.gherkin+plain' | 'text/x.cucumber.gherkin+markdown';
684683

685684
export enum StepDefinitionPatternType {
686685
CUCUMBER_EXPRESSION = 'CUCUMBER_EXPRESSION',

0 commit comments

Comments
 (0)