-
Notifications
You must be signed in to change notification settings - Fork 422
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1341 from ae0n/optional-enum-in-api-docs-fix
fixed docs generation of referenced enums when they're inside of a collection
- Loading branch information
Showing
5 changed files
with
74 additions
and
3 deletions.
There are no files selected for viewing
Empty file.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,4 +34,4 @@ components: | |
- blue | ||
- red | ||
shapeType: | ||
type: string | ||
type: string |
36 changes: 36 additions & 0 deletions
36
docs/openapi-docs/src/test/resources/enum/expected_enum_collections.yml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
openapi: 3.0.3 | ||
info: | ||
title: Enums | ||
version: '1.0' | ||
paths: | ||
/: | ||
get: | ||
operationId: getRoot | ||
responses: | ||
'200': | ||
description: '' | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Square' | ||
components: | ||
schemas: | ||
CornerStyle: | ||
type: string | ||
enum: | ||
- rounded | ||
- straight | ||
Square: | ||
type: object | ||
properties: | ||
cornerStyle: | ||
$ref: '#/components/schemas/CornerStyle' | ||
tags: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/Tag' | ||
Tag: | ||
type: string | ||
enum: | ||
- tag1 | ||
- tag2 |
This file contains 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
This file contains 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