extractExpectedResponseExample
Extracts expected response example from an operation for the given status code.
Return
the example value if found, null otherwise
Parameters
operation
the OpenAPI operation
openAPI
the OpenAPI specification
statusCode
the HTTP status code to look for
fun extractExpectedResponseExample(operation: Operation, openAPI: OpenAPI, statusCode: Int, exampleName: String?): Any?
Extracts expected response example from an operation for the given status code and example name.
When exampleName is provided, named examples are selected first using media type priority. If no named example is found (or it has no usable value), the standard selection order is used.
Return
the example value if found, null otherwise
Parameters
operation
the OpenAPI operation
openAPI
the OpenAPI specification
statusCode
the HTTP status code to look for
exampleName
optional named example to select from examples map