This repository was archived by the owner on Jul 27, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
This repository was archived by the owner on Jul 27, 2025. It is now read-only.
fail to render simple type array in pdf and xlsx formats #8
Copy link
Copy link
Labels
bugSomething isn't workingSomething isn't working
Description
When an array is of simple type, it is not correctly documented :
testList2:
description: Test list 3
type: array
items:
type: string
description: Array of stringPOC :
openapi: 3.0.0
info:
title: 'Sample Openapi Document'
description: 'This is a sample yaml for yaml-doc-tool'
version: '1.0.0'
servers:
- url: http://localhost:8080/api
description: Sample Development server
paths:
/sample/id/{id}:
get:
summary: Sample
parameters:
- name: id
in: path
required: true
schema:
type: string
responses:
'200':
description: Ok
content:
application/json:
schema:
$ref: '#/components/schemas/SampleResult'
components:
schemas:
SampleResult:
properties:
id:
type: string
example: '1234'
description: 'Id of the sample'
sampleTest:
type: string
example: 'Sample text'
description: 'Sample properties'
sampleLevelTwoA:
$ref: '#/components/schemas/SampleLevelTwoA'
sampleLevelTwoB:
$ref: '#/components/schemas/SampleLevelTwoB'
sampleLevelTwoC:
$ref: '#/components/schemas/SampleLevelTwoC'
sampleLevelTwoD:
$ref: '#/components/schemas/SampleLevelTwoD'
sampleLevelTwoE:
$ref: '#/components/schemas/SampleLevelTwoE'
SampleLevelTwoA:
properties:
note:
type: string
example: 'Level two notes A'
description: 'Level two description'
minLength: 1
maxLength: 5
count:
type: number
example: 100
description: 'Level two count'
minimum: 0
maximum: 99999
SampleLevelTwoB:
properties:
note:
type: string
example: 'Level two notes B'
description: 'Level two description'
SampleLevelTwoC:
properties:
note:
type: string
example: 'Level two notes C'
description: 'Level two description'
SampleLevelTwoD:
properties:
note:
type: string
example: 'Level two notes D'
description: 'Level two description'
SampleLevelTwoE:
properties:
note:
type: string
example: 'Level two notes E'
description: 'Level two description'
SampleLevelTwoRef1:
$ref: '#/components/schemas/SampleLevelTwoE'
SampleLevelTwoRef2:
$ref: '#/components/schemas/SampleLevelTwoD'
SampleArrayString:
description: Sample with array properties
properties:
testList1:
description: Test list 1
type: array
items:
$ref: '#/components/schemas/SampleLevelTwoA'
testList2:
description: Test list 3
type: array
items:
type: string
description: Array of string
testList3:
description: Test list 3
type: array
items:
$ref: '#/components/schemas/SampleLevelTwoB'Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working