-
Notifications
You must be signed in to change notification settings - Fork 531
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix to remove schema duplicates when resolveFully and then flatten
- Loading branch information
1 parent
59b104b
commit 8a25594
Showing
5 changed files
with
277 additions
and
30 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
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
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
199 changes: 199 additions & 0 deletions
199
modules/swagger-parser/src/test/resources/petStore1599.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,199 @@ | ||
swagger: '2.0' | ||
info: | ||
description: 'This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.' | ||
version: 1.0.0 | ||
title: Swagger Petstore | ||
termsOfService: 'http://swagger.io/terms/' | ||
contact: | ||
email: [email protected] | ||
license: | ||
name: Apache 2.0 | ||
url: 'http://www.apache.org/licenses/LICENSE-2.0.html' | ||
host: petstore.swagger.io | ||
basePath: /v2 | ||
tags: | ||
- name: pet | ||
description: Everything about your Pets | ||
externalDocs: | ||
description: Find out more | ||
url: 'http://swagger.io' | ||
- name: store | ||
description: Access to Petstore orders | ||
- name: user | ||
description: Operations about user | ||
externalDocs: | ||
description: Find out more about our store | ||
url: 'http://swagger.io' | ||
schemes: | ||
- https | ||
- 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: | ||
'200': | ||
description: Succesful request | ||
'405': | ||
description: Invalid input | ||
schema: | ||
type: object | ||
properties: | ||
code: | ||
type: integer | ||
format: int32 | ||
type: | ||
type: string | ||
message: | ||
type: string | ||
security: | ||
- petstore_auth: | ||
- 'write:pets' | ||
- 'read:pets' | ||
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: | ||
'200': | ||
description: Succesful request | ||
'400': | ||
description: Invalid ID supplied | ||
'404': | ||
description: Pet not found | ||
'405': | ||
description: Validation exception | ||
security: | ||
- petstore_auth: | ||
- 'write:pets' | ||
- 'read:pets' | ||
- api_key: [] | ||
securityDefinitions: | ||
petstore_auth: | ||
type: oauth2 | ||
authorizationUrl: 'https://petstore.swagger.io/oauth/authorize' | ||
flow: implicit | ||
scopes: | ||
'write:pets': modify pets in your account | ||
'read:pets': read your pets | ||
api_key: | ||
type: apiKey | ||
name: api_key | ||
in: header | ||
definitions: | ||
Category: | ||
type: object | ||
properties: | ||
id: | ||
type: integer | ||
format: int64 | ||
name: | ||
type: string | ||
xml: | ||
name: Category | ||
Tag: | ||
type: object | ||
properties: | ||
id: | ||
type: integer | ||
format: int64 | ||
name: | ||
type: string | ||
xml: | ||
name: Tag | ||
Pet: | ||
type: object | ||
required: | ||
- name | ||
- photoUrls | ||
properties: | ||
id: | ||
type: integer | ||
format: int64 | ||
category: | ||
$ref: '#/definitions/Category' | ||
name: | ||
type: string | ||
example: doggie | ||
photoUrls: | ||
type: array | ||
xml: | ||
name: photoUrl | ||
wrapped: true | ||
items: | ||
type: string | ||
tags: | ||
type: array | ||
xml: | ||
name: tag | ||
wrapped: true | ||
items: | ||
$ref: '#/definitions/Tag' | ||
status: | ||
type: string | ||
description: pet status in the store | ||
enum: | ||
- available | ||
- pending | ||
- sold | ||
xml: | ||
name: Pet | ||
example: | ||
id: 1000 | ||
category: | ||
id: 1000000 | ||
name: category1 | ||
name: Toby | ||
photoUrls: | ||
- www | ||
- xxx | ||
tags: | ||
- id: 999 | ||
name: puppy | ||
- id: 888 | ||
name: brown | ||
ApiResponse: | ||
type: object | ||
properties: | ||
code: | ||
type: integer | ||
format: int32 | ||
type: | ||
type: string | ||
message: | ||
type: string | ||
externalDocs: | ||
description: Find out more about Swagger | ||
url: 'http://swagger.io' |