Releases: lewishazell/openapi-generator-cucumber-plugin
Release list
0.0.1-rc4
Fixes
- Assert against wire format response content instead of the deserialized model in TypeScript
- Use client-configured
Gsonserializer instead of the default serializer in Java
v0.0.1-rc3
New features
- Added support for JSON path chaining to extract nested values.
- Introduced JSON subtree assertions (contains) for verifying nested structures.
Bug fixes
- Fixed coercion of response-chained values to target parameter types.
- Updated Go authentication snapshots and Java Maven file upload verification.
- Fixed sane default for revision property in build.
Improvements
- Added snapshot update utility script for easier test maintenance.
- Updated Petstore Prism mock feature file and affected snapshots.
- Added required properties and plugins for publishing to Maven Central.
Documentation
- Added DEVELOPMENT guide.
- Normalized title casing in scenario authoring guide.
- Documented JSON path chaining and subtree assertions.
v0.0.1-rc2: Files and fixes
What's changed
- File parameter support added
- enum-ref type support fixed in go
- JSON body params fixed in typescript-node
v0.0.1-rc1: First release candidate
I'm pleased to announce the first release candidate of the OpenAPI Generator Cucumber Plugin - a tool that bridges OpenAPI code generation and Cucumber-style API testing!
This plugin brings language-agnostic testing to your API clients by generating the code needed to run existing Cucumber test specifications against OpenAPI Generator-produced client libraries. Write your Cucumber scenarios once, and validate the behavior of generated clients across multiple languages using a consistent testing approach.
Features
Language-agnostic Cucumber test execution
This plugin enables execution of hand-written Cucumber test specifications against OpenAPI Generator–generated client libraries. It:
- Generates the step implementations required to run Cucumber scenarios against clients in:
- C#
- Java
- Go
- Python
- TypeScript (Node.js)
- Integrates into the OpenAPI Generator CLI via custom templates
- Works with any OpenAPI schema - bring your own
*.featurefiles and test logic
The included automation tests use
petstore-extended.yamland sample Cucumber scenarios for validation, but the plugin itself is schema-agnostic.
Works with standard tools:
- Requires OpenAPI Generator 7.11.0
Example test scenario
The following scenario tests the findPetById operation from the petstore-extended OpenAPI specification, asserting a 200 OK response and expected content:
Scenario: Successfully find a pet at the pet store
This scenario ensures that the user can successfully retrieve a pet from the store by its ID.
Given there is a "findPetById" request for the "DefaultApi"
And the "id" parameter has a value of "1"
When the request is sent
Then the response status should be 200
And the response content should be:
"""
{ "name": "Fluffy", "tag": "cat", "id": 1 }
"""These human-readable scenarios make it easy to test real-world client behavior across multiple runtimes.
What's in this release?
This release candidate focuses on:
- Establishing the core plugin structure and language templates
- Testing full-stack codegen + test execution across 5 languages
- Providing an extensible and maintainable testing framework
Limitations & notes
- This is a pre-release (
rc1): expect APIs and templates to evolve. - Language templates may differ slightly in output style or assumptions.
- API authorization in tests is not currently supported - this is planned.
- Some templates only support UTF-8 JSON responses - a fix is in progress.
Installation & usage
- Install prerequisites
Ensureopenapi-generator-cliis installed and available in yourPATH. - Download the plugin JAR
You can download the plugin directly from this release:wget https://github.com/lewishazell/openapi-generator-cucumber-plugin/releases/download/v0.0.1-rc1/openapi-generator-cucumber-plugin-0.0.1-rc1.jar -O path/to/openapi-generator-cucumber-plugin-0.0.1-rc1.jar
- Generate a client, copy in your Cucumber feature files, and run the tests
# Generate your Python client and accompanying Cucumber step implementations openapi-generator-cli generate \ --custom-generator path/to/openapi-generator-cucumber-plugin-0.0.1-rc1.jar \ -g python-cucumber \ -i path/to/your/openapi-spec.yaml \ -p cucumberTargetHost=http://localhost:4010 \ -o python-sdk/ # Copy your Cucumber feature files into the output folder cp -r features python-sdk # Run the tests using Cucumber cd python-sdk pytest