Skip to content

Commit

Permalink
feat(messages): added custom media type
Browse files Browse the repository at this point in the history
  • Loading branch information
sashokbg committed Feb 21, 2023
1 parent 5e14259 commit 49178d8
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions javascript/src/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ export class Source {

data: string = ''

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

export class SourceReference {
Expand Down Expand Up @@ -677,10 +677,9 @@ export enum PickleStepType {
OUTCOME = 'Outcome',
}

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

export enum StepDefinitionPatternType {
CUCUMBER_EXPRESSION = 'CUCUMBER_EXPRESSION',
Expand Down

0 comments on commit 49178d8

Please sign in to comment.