-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
466 additions
and
0 deletions.
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
179 changes: 179 additions & 0 deletions
179
modules/openapi-generator-maven-plugin/src/test/resources/issue-4512/dir1/petstore.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,179 @@ | ||
openapi: 3.0.0 | ||
servers: | ||
- url: 'http://petstore.swagger.io/v2' | ||
info: | ||
description: This is a sample Petstore **ONE** server. | ||
version: 1.0.0 | ||
title: OpenAPI Petstore | ||
paths: | ||
/pet: | ||
post: | ||
tags: | ||
- pet | ||
summary: Add a new pet to the store | ||
description: '' | ||
operationId: addPet | ||
responses: | ||
'200': | ||
description: successful operation | ||
content: | ||
application/xml: | ||
schema: | ||
$ref: '#/components/schemas/Pet' | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Pet' | ||
'405': | ||
description: Invalid input | ||
security: | ||
- petstore_auth: | ||
- 'write:pets' | ||
- 'read:pets' | ||
requestBody: | ||
$ref: '#/components/requestBodies/Pet' | ||
'/pet/{petId}': | ||
get: | ||
tags: | ||
- pet | ||
summary: Find pet by ID | ||
description: Returns a single pet | ||
operationId: getPetById | ||
parameters: | ||
- name: petId | ||
in: path | ||
description: ID of pet to return | ||
required: true | ||
schema: | ||
type: integer | ||
format: int64 | ||
responses: | ||
'200': | ||
description: successful operation | ||
content: | ||
application/xml: | ||
schema: | ||
$ref: '#/components/schemas/Pet' | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Pet' | ||
'400': | ||
description: Invalid ID supplied | ||
'404': | ||
description: Pet not found | ||
security: | ||
- api_key: [] | ||
post: | ||
tags: | ||
- pet | ||
summary: Updates a pet in the store with form data | ||
description: '' | ||
operationId: updatePetWithForm | ||
parameters: | ||
- name: petId | ||
in: path | ||
description: ID of pet that needs to be updated | ||
required: true | ||
schema: | ||
type: integer | ||
format: int64 | ||
responses: | ||
'405': | ||
description: Invalid input | ||
security: | ||
- petstore_auth: | ||
- 'write:pets' | ||
- 'read:pets' | ||
requestBody: | ||
content: | ||
application/x-www-form-urlencoded: | ||
schema: | ||
type: object | ||
properties: | ||
name: | ||
description: Updated name of the pet | ||
type: string | ||
status: | ||
description: Updated status of the pet | ||
type: string | ||
delete: | ||
tags: | ||
- pet | ||
summary: Deletes a pet | ||
description: '' | ||
operationId: deletePet | ||
parameters: | ||
- name: api_key | ||
in: header | ||
required: false | ||
schema: | ||
type: string | ||
- name: petId | ||
in: path | ||
description: Pet id to delete | ||
required: true | ||
schema: | ||
type: integer | ||
format: int64 | ||
responses: | ||
'400': | ||
description: Invalid pet value | ||
security: | ||
- petstore_auth: | ||
- 'write:pets' | ||
- 'read:pets' | ||
components: | ||
requestBodies: | ||
Pet: | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Pet' | ||
application/xml: | ||
schema: | ||
$ref: '#/components/schemas/Pet' | ||
description: Pet object that needs to be added to the store | ||
required: true | ||
securitySchemes: | ||
petstore_auth: | ||
type: oauth2 | ||
flows: | ||
implicit: | ||
authorizationUrl: 'http://petstore.swagger.io/api/oauth/dialog' | ||
scopes: | ||
'write:pets': modify pets in your account | ||
'read:pets': read your pets | ||
api_key: | ||
type: apiKey | ||
name: api_key | ||
in: header | ||
schemas: | ||
Pet: | ||
title: a Pet | ||
description: A pet for sale in the pet store | ||
type: object | ||
required: | ||
- name | ||
- photoUrls | ||
properties: | ||
id: | ||
type: integer | ||
format: int64 | ||
name: | ||
type: string | ||
example: doggie | ||
photoUrls: | ||
type: array | ||
xml: | ||
name: photoUrl | ||
wrapped: true | ||
items: | ||
type: string | ||
status: | ||
type: string | ||
description: pet status in the store | ||
enum: | ||
- available | ||
- pending | ||
- sold | ||
xml: | ||
name: Pet |
Oops, something went wrong.