fix: avoid rendering empty response schemas (#9667)

Refs #9666
Co-authored-by: Pierre Paysant-Le Roux <ppaysant@gmail.com>
This commit is contained in:
Oliwia Rogala
2024-03-06 15:10:29 +01:00
committed by GitHub
parent e2be707d7c
commit 32e7ce43d6
3 changed files with 75 additions and 1 deletions

View File

@@ -0,0 +1,31 @@
openapi: 3.1.0
info:
title: Empty response test case
version: '1'
paths:
'/':
get:
responses:
'200':
description: no content
'201':
description: no schema but an example
content:
application/json:
example:
foo: bar
'202':
description: no schema but examples
content:
application/json:
examples:
first:
value:
foo: bar
second:
value:
baz: foobar
'203':
description: no schema no example
content:
application/json: {}