fix(oas31): fix re-rendering of the Webhooks component (#9938)

Refs #9937
This commit is contained in:
Oliwia Rogala
2024-05-15 13:52:41 +02:00
committed by GitHub
parent 6d2b88eb43
commit b5c84f44c7
4 changed files with 97 additions and 2 deletions

View File

@@ -0,0 +1,59 @@
openapi: 3.1.0
info:
version: 1.0.0
title: Examples
description: ''
webhooks:
test-webhook:
post:
operationId: test-webhook
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/TestSchema'
examples:
TestExample1:
$ref: '#/components/examples/TestExample1'
TestExample2:
$ref: '#/components/examples/TestExample2'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/TestSchema'
examples:
TestExample1:
$ref: '#/components/examples/TestExample1'
TestExample2:
$ref: '#/components/examples/TestExample2'
components:
schemas:
TestSchema:
type: object
properties:
userId:
type: string
examples: ['userId example from schema']
orders:
type: array
items:
type: object
properties:
orderId:
type: string
examples: ['orderId example from schema']
examples:
TestExample1:
value:
userId: 'userId example from examples'
orders:
- orderId: 'orderId example from examples'
TestExample2:
value:
userId: 'second userId example from examples'
orders:
- orderId: 'second orderId example from examples'