Created
October 27, 2020 12:49
-
-
Save fl034/c24adc469b154dc61e8b70b5f969bc28 to your computer and use it in GitHub Desktop.
OpenAPI Generator Kotlin Array at Root Level Bug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: 3.0.0 | |
info: | |
title: API | |
description: Testing arrays at root level in kotlin | |
version: 1.0.0 | |
paths: | |
/myObjectsAtRootLevel: | |
get: | |
tags: | |
- Not parsable to List<SubObject> | |
summary: Retrieve array of objects at root level | |
responses: | |
'200': | |
description: Results | |
content: | |
application/json: | |
schema: | |
type: array | |
items: | |
$ref: '#/components/schemas/SubObject' | |
/myObjectsEncapuslated: | |
get: | |
tags: | |
- Parsable to MyObject containing List<SubObject> | |
summary: Retrieve array of objects encapsulated in object | |
responses: | |
'200': | |
description: Results | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/MyObject' | |
components: | |
schemas: | |
MyObject: | |
type: object | |
properties: | |
title: | |
type: string | |
children: | |
type: array | |
items: | |
$ref: '#/components/schemas/SubObject' | |
required: | |
- title | |
SubObject: | |
type: object | |
properties: | |
title: | |
type: string | |
required: | |
- title |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment