cucumber / cucumber/gherkin-utils

Generate a feature file from a parsed document

Open
#3 1 comment 0 reactions 0 assignees View on GitHub
:zap: enhancement
Dominant language
TypeScript
Stars
20
Forks
8
Avg merge
1d 22h
Merged PRs (30d)
5

Description

### 🤔 What's the problem you're trying to solve?

As one has the Parser like here:
```
parser = Parser()
gherkin_document = parser.parse("Feature: ...")
```
and has changed/updated a few elements of the gherkin_document (which is really just a dictionary in Python)
Isn't it logical for many instances to want to re-generate the feature file ?

### ✨ What's your proposed solution?
A script which extracts the information from within the Parsed Gherkin document and generates a valid .feature file with this feature

### ⛏ Have you considered any alternatives or workarounds?
If there is not none already the only way to go is to build one myself but for this community it would be a more mature solution if you could integrate it in this repo

### 📚 Any additional context?

----

*This text was originally generated from a [template](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/about-issue-and-pull-request-templates), then edited by hand. [You can modify the template here.](https://github.com/cucumber/.github/edit/main/.github/ISSUE_TEMPLATE/feature_request.md)*

Contributor guide

Open the contributing guide

Research direction

Start with the Parser.parse example and inspect how the returned gherkin_document is represented and exposed by the API. Define the supported document elements and serialization rules before locating an implementation entry point. Done means modified parsed documents can be generated as valid .feature text, with coverage for the supported cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.