fix(xml): example generation if an array has an example (#6634)
ref: #6627
This commit is contained in:
41
test/e2e-cypress/static/documents/bugs/6627.yaml
Normal file
41
test/e2e-cypress/static/documents/bugs/6627.yaml
Normal file
@@ -0,0 +1,41 @@
|
||||
openapi: 3.0.1
|
||||
info:
|
||||
title: XML array schema with array-level example
|
||||
version: 1.0.0
|
||||
|
||||
paths:
|
||||
/users:
|
||||
get:
|
||||
responses:
|
||||
"200":
|
||||
description: ''
|
||||
content:
|
||||
application/xml:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Users'
|
||||
|
||||
components:
|
||||
schemas:
|
||||
Users:
|
||||
type: array
|
||||
example:
|
||||
- id: 123
|
||||
name: bob
|
||||
- id: 456
|
||||
name: jane
|
||||
xml:
|
||||
name: Users
|
||||
wrapped: true
|
||||
items:
|
||||
type: object
|
||||
xml:
|
||||
name: User
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
xml:
|
||||
attribute: true
|
||||
name:
|
||||
type: string
|
||||
xml:
|
||||
attribute: true
|
||||
Reference in New Issue
Block a user