-
Notifications
You must be signed in to change notification settings - Fork 533
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 #482 from swagger-api/issue-480
added fix, test for #480
- Loading branch information
Showing
3 changed files
with
137 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
108 changes: 108 additions & 0 deletions
108
modules/swagger-parser/src/test/resources/issue-480.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,108 @@ | ||
swagger: "2.0" | ||
info: | ||
version: "1.0.0" | ||
title: "Swagger Petstore" | ||
basePath: "/v2" | ||
schemes: | ||
- "http" | ||
paths: | ||
/pet: | ||
post: | ||
tags: | ||
- "pet" | ||
summary: "Add a new pet to the store" | ||
description: "" | ||
operationId: "addPet" | ||
consumes: | ||
- "application/json" | ||
- "application/xml" | ||
produces: | ||
- "application/xml" | ||
- "application/json" | ||
parameters: | ||
- in: "body" | ||
name: "body" | ||
description: "Pet object that needs to be added to the store" | ||
required: true | ||
schema: | ||
$ref: "#/definitions/Pet" | ||
responses: | ||
405: | ||
description: "Invalid input" | ||
security: | ||
- api_key: [] | ||
put: | ||
tags: | ||
- "pet" | ||
summary: "Update an existing pet" | ||
description: "" | ||
operationId: "updatePet" | ||
consumes: | ||
- "application/json" | ||
- "application/xml" | ||
produces: | ||
- "application/xml" | ||
- "application/json" | ||
parameters: | ||
- in: "body" | ||
name: "body" | ||
description: "Pet object that needs to be added to the store" | ||
required: true | ||
schema: | ||
$ref: "#/definitions/Pet" | ||
responses: | ||
400: | ||
description: "Invalid ID supplied" | ||
404: | ||
description: "Pet not found" | ||
405: | ||
description: "Validation exception" | ||
security: | ||
- petstore_auth: | ||
- "write:pets" | ||
- "read:pets" | ||
|
||
securityDefinitions: | ||
petstore_auth: | ||
type: "oauth2" | ||
description: "This is a description" | ||
authorizationUrl: "http://petstore.swagger.io/oauth/dialog" | ||
flow: "implicit" | ||
scopes: | ||
write:pets: "modify pets in your account" | ||
read:pets: "read your pets" | ||
api_key: | ||
type: "apiKey" | ||
name: "api_key" | ||
description: "This is another description" | ||
in: "header" | ||
|
||
definitions: | ||
Pet: | ||
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" |