forked from swagger-api/swagger-parser
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue swagger-api#2118. Add unit test to check that empty title inlin…
…e schemas are gettting proper model name
- Loading branch information
1 parent
79cb03b
commit 582bd15
Showing
3 changed files
with
110 additions
and
1 deletion.
There are no files selected for viewing
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
97 changes: 97 additions & 0 deletions
97
modules/swagger-parser-v3/src/test/resources/issue2118/issue2118.yaml
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,97 @@ | ||
openapi: "3.0.0" | ||
info: | ||
title: API | ||
description: API | ||
version: 1.0.0 | ||
paths: | ||
/pet-types: | ||
post: | ||
description: Creates a new pet in the store. Duplicates are allowed | ||
operationId: addPet | ||
requestBody: | ||
description: Pet to add to the store | ||
required: true | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/MegaPet' | ||
responses: | ||
'200': | ||
description: pet response | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/MegaPet' | ||
default: | ||
description: unexpected error | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Error' | ||
components: | ||
schemas: | ||
Error: | ||
required: | ||
- code | ||
- message | ||
properties: | ||
code: | ||
type: integer | ||
format: int32 | ||
message: | ||
type: string | ||
MegaPet: | ||
properties: | ||
id: | ||
type: integer | ||
format: int64 | ||
code: | ||
type: string | ||
format: byte | ||
example: MjIyMjIyMg== | ||
additionalCode: | ||
type: string | ||
format: binary | ||
example: MjIyMjIyMg== | ||
dateOfBirth: | ||
type: string | ||
format: date | ||
example: "2000-12-12" | ||
timeOfVaccination: | ||
type: string | ||
format: date-time | ||
example: 2012-01-24T15:54:14.876Z | ||
age: | ||
type: string | ||
pattern: "[0-9]+" | ||
owner: | ||
type: object | ||
previousOwner: | ||
type: object | ||
example: "prev owner" | ||
metadata: | ||
type: object | ||
maxProperties: 10 | ||
additionalProperties: | ||
type: string | ||
maxLength: 256 | ||
creator: | ||
title: '' | ||
description: '' | ||
type: object | ||
properties: | ||
id: | ||
description: '' | ||
type: string | ||
example: 63d415e0dd0d828c3a878548 | ||
readOnly: true | ||
email: | ||
description: '' | ||
type: string | ||
example: [email protected] | ||
readOnly: true | ||
displayName: | ||
description: '' | ||
type: string | ||
example: Boba Fett | ||
readOnly: true |