File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import { z } from "zod/v4";
2828import { ResponseVariant } from "./api-response" ;
2929import { ezBufferBrand } from "./buffer-schema" ;
3030import {
31+ doesImplyContent ,
3132 FlatObject ,
3233 getRoutePathParams ,
3334 getTransformedType ,
@@ -498,7 +499,7 @@ export const depictResponse = ({
498499 statusCode : number ;
499500 hasMultipleStatusCodes : boolean ;
500501} ) : ResponseObject => {
501- if ( ! mimeTypes ) return { description } ;
502+ if ( ! mimeTypes || ! doesImplyContent ( method , variant ) ) return { description } ;
502503 const response = asOAS (
503504 depict ( schema , {
504505 rules : { ...brandHandling , ...depicters } ,
Original file line number Diff line number Diff line change @@ -11,11 +11,7 @@ import * as R from "ramda";
1111import { responseVariants } from "./api-response" ;
1212import { contentTypes } from "./content-type" ;
1313import { DocumentationError } from "./errors" ;
14- import {
15- doesImplyContent ,
16- getInputSources ,
17- makeCleanId ,
18- } from "./common-helpers" ;
14+ import { getInputSources , makeCleanId } from "./common-helpers" ;
1915import { CommonConfig } from "./config-type" ;
2016import { processContainers } from "./logical-container" ;
2117import { ClientMethod } from "./method" ;
@@ -205,7 +201,7 @@ export class Documentation extends OpenApiBuilder {
205201 ...commons ,
206202 variant,
207203 schema,
208- mimeTypes : doesImplyContent ( method , variant ) ? mimeTypes : null ,
204+ mimeTypes,
209205 statusCode,
210206 hasMultipleStatusCodes :
211207 apiResponses . length > 1 || statusCodes . length > 1 ,
You can’t perform that action at this time.
0 commit comments