Skip to content

feat: Ability to get response schema by preferred header content type#1031

Draft
Jadenzzz wants to merge 1 commit intoreadmeio:mainfrom
Jadenzzz:jayden/cx-1598-endpoints-missing-from-recipe-dropdown-in-new-ui
Draft

feat: Ability to get response schema by preferred header content type#1031
Jadenzzz wants to merge 1 commit intoreadmeio:mainfrom
Jadenzzz:jayden/cx-1598-endpoints-missing-from-recipe-dropdown-in-new-ui

Conversation

@Jadenzzz
Copy link

🚥 Resolves ISSUE_ID

Added preferContentType to Operation so we can fetch response schema based on different header 'accept' content type

🧰 Changes

Describe in detail what this PR is for.

🧬 QA & Testing

Provide as much information as you can on how to test what you've done.

@Jadenzzz Jadenzzz requested a review from erunion as a code owner December 19, 2025 06:59

if (mediaType) {
if (!(mediaType in requestBody.content)) {
const mediaTypeToUse = mediaType || this.selectedContentType;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels a little weird that getResponseAsJSONSchema has the preferredContentType option but this doesn't.

Comment on lines -493 to -497
/**
* Get a single response for this status code, formatted as JSON schema.
*
* @param statusCode Status code to pull a JSON Schema response for.
*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add this back in?

@erunion erunion marked this pull request as draft February 13, 2026 06:25
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.

2 participants