-
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.
Merge pull request #1355 from swagger-api/reference-response-schema
Reference response schema
- Loading branch information
Showing
4 changed files
with
184 additions
and
17 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
47 changes: 47 additions & 0 deletions
47
modules/swagger-parser/src/test/resources/folder/domains/Test/api.test.com/v2.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,47 @@ | ||
### Domains, a place to put your reusable components | ||
|
||
responses: | ||
GeneralError: | ||
description: Occurs when something goes wrong | ||
schema: | ||
$ref: 'v2.yaml#/definitions/Test.Common.ErrorResponseMessage' | ||
|
||
|
||
definitions: | ||
|
||
Test.Common.DocUrl: | ||
type: string | ||
format: uri | ||
description: The documentation related to this operation. | ||
example: 'https://api-docs.test.com/#operation/EnableChannelCatalog' | ||
|
||
|
||
Test.Common.ErrorResponseMessage: | ||
type: object | ||
required: | ||
- errors | ||
properties: | ||
errors: | ||
type: array | ||
uniqueItems: false | ||
items: | ||
$ref: 'v2.yaml#/definitions/Test.Common.UserErrorMessage' | ||
|
||
Test.Common.UserErrorMessage: | ||
type: object | ||
required: | ||
- code | ||
- message | ||
properties: | ||
docUrl: | ||
$ref: 'v2.yaml#/definitions/Test.Common.DocUrl' | ||
code: | ||
type: string | ||
description: the error code. The error code can be a pattern containing the argument's name | ||
example: Here goes an example text | ||
message: | ||
type: string | ||
description: The error message | ||
example: | | ||
There is already an importation in progress: 12345-XYZBN-00122-44444 | ||
41 changes: 41 additions & 0 deletions
41
modules/swagger-parser/src/test/resources/swagger-reference-response.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,41 @@ | ||
swagger: '2.0' | ||
info: | ||
version: "2.0" | ||
title: Marketplaces - Orders - Subscriptions | ||
description: The order subscription management | ||
|
||
contact: | ||
email: [email protected] | ||
|
||
license: | ||
name: Test | ||
url: http://www.test.com | ||
|
||
|
||
security: | ||
- api_key: [] | ||
|
||
consumes: | ||
- application/json | ||
produces: | ||
- application/json | ||
|
||
|
||
paths: | ||
|
||
'/': | ||
get: | ||
tags: | ||
- Subscriptions | ||
operationId: GetSubscriptionList | ||
summary: Get the subscription list | ||
responses: | ||
200: | ||
$ref: 'folder/domains/Test/api.test.com/v2.yaml#/responses/GeneralError' | ||
deprecated: false | ||
|
||
|
||
definitions: {} | ||
|
||
host: api.test.com | ||
basePath: /v2/user/marketplaces/orders |