Skip to content

Fix body property example key in recorded OpenAPI#36

Open
belka-fiz wants to merge 1 commit intoJamalZeynalov:masterfrom
belka-fiz:fix/body-property-example-key
Open

Fix body property example key in recorded OpenAPI#36
belka-fiz wants to merge 1 commit intoJamalZeynalov:masterfrom
belka-fiz:fix/body-property-example-key

Conversation

@belka-fiz
Copy link
Copy Markdown

Body request properties were serialized with the field name as the nested example key ({k: value, "type": ...}), producing non-standard OpenAPI like properties.product_type.product_type: income. The Java analyzer (swagger-coverage-commandline) expects the value at properties.<name>.example, so it could not extract values for body enum fields and reported Checked values: [null, ...] even when tests sent real values.

Switch the key to the standard example so analyzers can read the value. Effect: PropertyValueConditionPredicate now correctly sees the sent values, flipping body enum-coverage rules from red to green.

Body request properties were serialized with the field name as the
nested example key (`{k: value, "type": ...}`), producing non-standard
OpenAPI like `properties.product_type.product_type: income`. The Java
analyzer (`swagger-coverage-commandline`) expects the value at
`properties.<name>.example`, so it could not extract values for body
enum fields and reported `Checked values: [null, ...]` even when tests
sent real values.

Switch the key to the standard `example` so analyzers can read the
value. Effect: PropertyValueConditionPredicate now correctly sees the
sent values, flipping body enum-coverage rules from red to green.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant