Skip to content

feat(messages): added custom media type #139

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

sashokbg
Copy link

🤔 What's changed?

Add the ability to use custom source media type when implementing a new "flavor" for asciidoc.
Example: adding "adoc" media type.

This pull request is a requirement for the main PR: cucumber/gherkin#95

⚡️ What's your motivation?

Please read: cucumber/gherkin#95

🏷️ What kind of change is this?

  • 🏦 Refactoring/debt/DX (improvement to code design, tooling, documentation etc. without changing behaviour)

♻️ Anything particular you want feedback on?

📋 Checklist:

  • I agree to respect and uphold the Cucumber Community Code of Conduct
  • I've changed the behaviour of the code
    • I have added/updated tests to cover my changes.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
  • Users should know about my change
    • I have added an entry to the "Unreleased" section of the CHANGELOG, linking to this pull request.

This text was originally generated from a template, then edited by hand. You can modify the template here.

Sorry, something went wrong.

@aslakhellesoy
Copy link
Contributor

The messages.ts file is generated from the JSON schemas in this repo. We do this for all languages to ensure compatibility.

The only way to modify messages.ts is to modify the JSON schema and run the code generation again. See CONTRIBUTING.md for details.

@sashokbg
Copy link
Author

The messages.ts file is generated from the JSON schemas in this repo. We do this for all languages to ensure compatibility.

The only way to modify messages.ts is to modify the JSON schema and run the code generation again. See CONTRIBUTING.md for details.

Thank you for the feedback - I missed that part. Will fix when I get some free time !

@sashokbg
Copy link
Author

Hello @aslakhellesoy I need some help - I am unable to find how to easily add a "custom" type for the MediaType without removing the validation.

This PR's idea is to enable a CustomMediaType that can be used to register anything (check cucumber/gherkin#95)

Should I add another field called "customMediaType" with type just "string" under the existing "mediaType" ?

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@luke-hill
Copy link
Contributor

Hi @sashokbg is this something you're still working on. As a lot of the messages have changed in the last 2 year

@sashokbg
Copy link
Author

hello @luke-hill no it was related to another PR that aimed at adding asciidoc support to cucumber but I abandoned the idea since not enough interest from the community

@sashokbg sashokbg closed this Apr 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants