ResponseExampleExtractor
Extracts expected response examples from OpenAPI operations.
This class handles the extraction of response examples from OpenAPI specifications, using a defined selection order:
Response: exact status -> range (e.g. 2XX) -> default
Media types: JSON/JWT-like -> XML -> other (alphabetical)
Example selection: explicit examples are chosen by media type priority; schema-derived fallback is JSON/JWT-like only
The schema-derived fallback slot is pluggable: pass a ResponseBodyGenerator to combine the extractor's explicit-example precedence with a custom body generator.
Constructors
Creates an extractor whose fallback bodies are derived by schemaExampleValueGenerator.
Functions
Extracts expected response example from an operation for the given status code.
Extracts expected response example from an operation for the given status code and example name.
Extracts expected response example and media type from an operation for the given status code.
Extracts expected response example and media type from an operation for the given status code and example name.