extractExpectedResponseExampleWithMediaType

fun extractExpectedResponseExampleWithMediaType(operation: Operation, openAPI: OpenAPI, statusCode: Int): ExtractedResponseExample

Extracts expected response example and media type from an operation for the given status code.

Return

extracted response body and selected media type, if any

Parameters

operation

the OpenAPI operation

openAPI

the OpenAPI specification

statusCode

the HTTP status code to look for


fun extractExpectedResponseExampleWithMediaType(operation: Operation, openAPI: OpenAPI, statusCode: Int, exampleName: String?): ExtractedResponseExample

Extracts expected response example and media type from an operation for the given status code and example name.

Return

extracted response body and selected media type, if any

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