-
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.
add targeted sample spec to demonstrate duplicated equivalent refs
- Loading branch information
Showing
16 changed files
with
466 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
13 changes: 13 additions & 0 deletions
13
modules/swagger-parser-v3/src/test/resources/oas3.fetched/components/schemas/Error.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,13 @@ | ||
description: Error responses are included with 4xx and 5xx HTTP responses from the | ||
API service. Either "error" or "errors" will be set. | ||
properties: | ||
error: | ||
description: A description of the error that caused the request to fail. | ||
type: string | ||
errors: | ||
description: A list of errors that contributed to the request failing. | ||
items: | ||
description: An error message that contributed to the request failing. | ||
type: string | ||
type: array | ||
type: object |
26 changes: 26 additions & 0 deletions
26
modules/swagger-parser-v3/src/test/resources/oas3.fetched/components/schemas/Event.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,26 @@ | ||
properties: | ||
body: | ||
type: string | ||
created_at: | ||
format: date-time | ||
type: string | ||
href: | ||
type: string | ||
id: | ||
format: uuid | ||
type: string | ||
interpolated: | ||
type: string | ||
relationships: | ||
items: | ||
$ref: './Href.yaml' | ||
type: array | ||
state: | ||
type: string | ||
type: | ||
type: string | ||
modified_by: | ||
type: object | ||
ip: | ||
type: string | ||
type: object |
8 changes: 8 additions & 0 deletions
8
modules/swagger-parser-v3/src/test/resources/oas3.fetched/components/schemas/EventList.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,8 @@ | ||
properties: | ||
events: | ||
items: | ||
$ref: './Event.yaml' | ||
type: array | ||
meta: | ||
$ref: './Meta.yaml' | ||
type: object |
6 changes: 6 additions & 0 deletions
6
modules/swagger-parser-v3/src/test/resources/oas3.fetched/components/schemas/Href.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,6 @@ | ||
properties: | ||
href: | ||
type: string | ||
required: | ||
- href | ||
type: object |
18 changes: 18 additions & 0 deletions
18
modules/swagger-parser-v3/src/test/resources/oas3.fetched/components/schemas/Meta.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,18 @@ | ||
properties: | ||
first: | ||
$ref: './Href.yaml' | ||
last: | ||
$ref: './Href.yaml' | ||
next: | ||
$ref: './Href.yaml' | ||
previous: | ||
$ref: './Href.yaml' | ||
self: | ||
$ref: './Href.yaml' | ||
total: | ||
type: integer | ||
current_page: | ||
type: integer | ||
last_page: | ||
type: integer | ||
type: object |
40 changes: 40 additions & 0 deletions
40
modules/swagger-parser-v3/src/test/resources/oas3.fetched/openapi3.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,40 @@ | ||
openapi: 3.0.0 | ||
info: | ||
version: 1.0.0 | ||
title: Example Duplicate Refs API | ||
contact: | ||
email: support@example.com | ||
name: Example API Team | ||
description: | | ||
Sample API spec to validate handling of different file paths that reference the same file | ||
license: | ||
name: Equinix Metal | ||
url: https://metal.equinix.com/legal/ | ||
termsOfService: https://metal.equinix.com/legal/ | ||
servers: | ||
- url: https://api.example.com/duplicateRefs | ||
components: | ||
schemas: | ||
Error: | ||
$ref: "./components/schemas/Error.yaml" | ||
Event: | ||
$ref: "./components/schemas/Event.yaml" | ||
EventList: | ||
$ref: "./components/schemas/EventList.yaml" | ||
paths: | ||
/connections/{connection_id}/ports/{id}/events: | ||
$ref: ./paths/connections/connection_id/ports/id/events.yaml | ||
/devices/{id}/events: | ||
$ref: ./paths/devices/id/events.yaml | ||
/events: | ||
$ref: ./paths/events.yaml | ||
/events/{id}: | ||
$ref: ./paths/events/id.yaml | ||
/organizations/{id}/events: | ||
$ref: ./paths/organizations/id/events.yaml | ||
/projects/{id}/events: | ||
$ref: ./paths/projects/id/events.yaml | ||
/routes/{id}/events: | ||
$ref: ./paths/routes/id/events.yaml | ||
/virtual-circuits/{id}/events: | ||
$ref: ./paths/virtual-circuits/id/events.yaml |
39 changes: 39 additions & 0 deletions
39
...ger-parser-v3/src/test/resources/oas3.fetched/paths/connections/connection_id/events.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,39 @@ | ||
get: | ||
description: Returns a list of the interconnection events | ||
operationId: findInterconnectionEvents | ||
parameters: | ||
- description: Interconnection UUID | ||
in: path | ||
name: connection_id | ||
required: true | ||
schema: | ||
format: uuid | ||
type: string | ||
responses: | ||
"200": | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "../../../components/schemas/EventList.yaml" | ||
description: ok | ||
"401": | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "../../../components/schemas/Error.yaml" | ||
description: unauthorized | ||
"403": | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "../../../components/schemas/Error.yaml" | ||
description: forbidden | ||
"404": | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "../../../components/schemas/Error.yaml" | ||
description: not found | ||
summary: Retrieve interconnection events | ||
tags: | ||
- Events |
46 changes: 46 additions & 0 deletions
46
...r-v3/src/test/resources/oas3.fetched/paths/connections/connection_id/ports/id/events.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,46 @@ | ||
get: | ||
description: Returns a list of the interconnection port events | ||
operationId: findInterconnectionPortEvents | ||
parameters: | ||
- description: Interconnection UUID | ||
in: path | ||
name: connection_id | ||
required: true | ||
schema: | ||
format: uuid | ||
type: string | ||
- description: Interconnection Port UUID | ||
in: path | ||
name: id | ||
required: true | ||
schema: | ||
format: uuid | ||
type: string | ||
responses: | ||
"200": | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "../../../../../components/schemas/Event.yaml" | ||
description: ok | ||
"401": | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "../../../../../components/schemas/Error.yaml" | ||
description: unauthorized | ||
"403": | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "../../../../../components/schemas/Error.yaml" | ||
description: forbidden | ||
"404": | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "../../../../../components/schemas/Error.yaml" | ||
description: not found | ||
summary: Retrieve interconnection port events | ||
tags: | ||
- Events |
39 changes: 39 additions & 0 deletions
39
modules/swagger-parser-v3/src/test/resources/oas3.fetched/paths/devices/id/events.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,39 @@ | ||
get: | ||
description: Returns a list of events pertaining to a specific device | ||
operationId: findDeviceEvents | ||
parameters: | ||
- description: Device UUID | ||
in: path | ||
name: id | ||
required: true | ||
schema: | ||
format: uuid | ||
type: string | ||
responses: | ||
"200": | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "../../../components/schemas/EventList.yaml" | ||
description: ok | ||
"401": | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "../../../components/schemas/Error.yaml" | ||
description: unauthorized | ||
"403": | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "../../../components/schemas/Error.yaml" | ||
description: forbidden | ||
"404": | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "../../../components/schemas/Error.yaml" | ||
description: not found | ||
summary: Retrieve device's events | ||
tags: | ||
- Events |
20 changes: 20 additions & 0 deletions
20
modules/swagger-parser-v3/src/test/resources/oas3.fetched/paths/events.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,20 @@ | ||
get: | ||
description: Returns a list of the current user’s events | ||
operationId: findEvents | ||
parameters: | ||
responses: | ||
"200": | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "../components/schemas/EventList.yaml" | ||
description: ok | ||
"401": | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "../components/schemas/Error.yaml" | ||
description: unauthorized | ||
summary: Retrieve current user's events | ||
tags: | ||
- Events |
39 changes: 39 additions & 0 deletions
39
modules/swagger-parser-v3/src/test/resources/oas3.fetched/paths/events/id.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,39 @@ | ||
get: | ||
description: Returns a single event if the user has access | ||
operationId: findEventById | ||
parameters: | ||
- description: Event UUID | ||
in: path | ||
name: id | ||
required: true | ||
schema: | ||
format: uuid | ||
type: string | ||
responses: | ||
"200": | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "../../components/schemas/Event.yaml" | ||
description: ok | ||
"401": | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "../../components/schemas/Error.yaml" | ||
description: unauthorized | ||
"403": | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "../../components/schemas/Error.yaml" | ||
description: forbidden | ||
"404": | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "../../components/schemas/Error.yaml" | ||
description: not found | ||
summary: Retrieve an event | ||
tags: | ||
- Events |
39 changes: 39 additions & 0 deletions
39
modules/swagger-parser-v3/src/test/resources/oas3.fetched/paths/organizations/id/events.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,39 @@ | ||
get: | ||
description: Returns a list of events for a single organization | ||
operationId: findOrganizationEvents | ||
parameters: | ||
- description: Organization UUID | ||
in: path | ||
name: id | ||
required: true | ||
schema: | ||
format: uuid | ||
type: string | ||
responses: | ||
"200": | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "../../../components/schemas/EventList.yaml" | ||
description: ok | ||
"401": | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "../../../components/schemas/Error.yaml" | ||
description: unauthorized | ||
"403": | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "../../../components/schemas/Error.yaml" | ||
description: forbidden | ||
"404": | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "../../../components/schemas/Error.yaml" | ||
description: not found | ||
summary: Retrieve organization's events | ||
tags: | ||
- Events |
Oops, something went wrong.