- Added /api/v2/greet POST endpoint with JSON request/response - Implemented ServiceV2 with Hello my friend <name>! greeting format - Added api.v2_enabled feature flag (default: false) - Extended BDD tests to cover v2 scenarios - Maintained full backward compatibility with v1 API - Added DLC_API_V2_ENABLED environment variable support - Created ADR 0010-api-v2-feature-flag.md - Updated configuration system to support API versioning
23 lines
894 B
Gherkin
23 lines
894 B
Gherkin
# features/greet.feature
|
|
Feature: Greet Service
|
|
The greet service should return appropriate greetings
|
|
|
|
Scenario: Default greeting
|
|
Given the server is running
|
|
When I request the default greeting
|
|
Then the response should be "{\"message\":\"Hello world!\"}"
|
|
|
|
Scenario: Personalized greeting
|
|
Given the server is running
|
|
When I request a greeting for "John"
|
|
Then the response should be "{\"message\":\"Hello John!\"}"
|
|
|
|
Scenario: v2 greeting with JSON POST request
|
|
Given the server is running with v2 enabled
|
|
When I send a POST request to v2 greet with name "John"
|
|
Then the response should be "{\"message\":\"Hello my friend John!\"}"
|
|
|
|
Scenario: v2 default greeting with empty name
|
|
Given the server is running with v2 enabled
|
|
When I send a POST request to v2 greet with name ""
|
|
Then the response should be "{\"message\":\"Hello my friend!\"}" |