-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(expand): parameters & responses should properly follow remote doc…
… resolution when SKipSchema * fixes #182 * contributes go-swagger/go-swagger#2743 Signed-off-by: Frederic BIDON <[email protected]>
- Loading branch information
Showing
21 changed files
with
225 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
swagger: '2.0' | ||
info: | ||
version: 0.0.0 | ||
title: Simple API | ||
paths: | ||
/bar: | ||
$ref: 'swagger/paths/bar.yml' |
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,11 @@ | ||
swagger: '2.0' | ||
info: | ||
version: 0.0.0 | ||
title: Simple API | ||
paths: | ||
/foo: | ||
$ref: 'swagger/paths/foo.yml' | ||
/bar: | ||
$ref: 'swagger/paths/bar.yml' | ||
/nested: | ||
$ref: 'swagger/paths/nested.yml#/response' |
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,9 @@ | ||
ErrorPayload: | ||
title: Error Payload | ||
required: | ||
- errors | ||
properties: | ||
errors: | ||
type: array | ||
items: | ||
$ref: './items.yml#/ErrorDetailsItem' |
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,15 @@ | ||
ErrorDetailsItem: | ||
title: Error details item | ||
description: Represents an item of the list of details of an error. | ||
required: | ||
- message | ||
- code | ||
properties: | ||
message: | ||
type: string | ||
code: | ||
type: string | ||
details: | ||
type: array | ||
items: | ||
type: string |
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 @@ | ||
get: | ||
responses: | ||
200: | ||
description: OK | ||
schema: | ||
type: array | ||
items: | ||
$ref: '../user/index.yml#/User' ## this doesn't work |
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 @@ | ||
get: | ||
responses: | ||
200: | ||
description: OK | ||
500: | ||
description: OK | ||
schema: | ||
$ref: '../definitions.yml#/ErrorPayload' |
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 @@ | ||
/foo: | ||
$ref: ./foo.yml | ||
/bar: | ||
$ref: ./bar.yml | ||
/nested: | ||
$ref: ./nested.yml#/response |
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,14 @@ | ||
response: | ||
get: | ||
responses: | ||
200: | ||
description: OK | ||
schema: | ||
$ref: '#/definitions/SameFileReference' | ||
|
||
definitions: | ||
SameFileReference: | ||
type: object | ||
properties: | ||
name: | ||
type: string |
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,2 @@ | ||
User: | ||
$ref: './model.yml' |
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,4 @@ | ||
type: object | ||
properties: | ||
name: | ||
type: string |
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,11 @@ | ||
swagger: '2.0' | ||
info: | ||
version: 0.0.0 | ||
title: Simple API | ||
paths: | ||
/foo: | ||
$ref: 'swagger/paths/foo.yml' | ||
/bar: | ||
$ref: 'swagger/paths/bar.yml' | ||
/nested: | ||
$ref: 'swagger/paths/nested.yml#/response' |
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,9 @@ | ||
ErrorPayload: | ||
title: Error Payload | ||
required: | ||
- errors | ||
properties: | ||
errors: | ||
type: array | ||
items: | ||
$ref: './items.yml#/ErrorDetailsItem' |
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,15 @@ | ||
ErrorDetailsItem: | ||
title: Error details item | ||
description: Represents an item of the list of details of an error. | ||
required: | ||
- message | ||
- code | ||
properties: | ||
message: | ||
type: string | ||
code: | ||
type: string | ||
details: | ||
type: array | ||
items: | ||
type: string |
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 @@ | ||
get: | ||
responses: | ||
200: | ||
description: OK | ||
schema: | ||
type: array | ||
items: | ||
$ref: './swagger/user/index.yml#/User' ## this works |
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 @@ | ||
get: | ||
responses: | ||
200: | ||
description: OK | ||
500: | ||
description: OK | ||
schema: | ||
$ref: '../definitions.yml#/ErrorPayload' |
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 @@ | ||
/foo: | ||
$ref: ./foo.yml | ||
/bar: | ||
$ref: ./bar.yml | ||
/nested: | ||
$ref: ./nested.yml#/response |
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,14 @@ | ||
response: | ||
get: | ||
responses: | ||
200: | ||
description: OK | ||
schema: | ||
$ref: '#/definitions/SameFileReference' | ||
|
||
definitions: | ||
SameFileReference: | ||
type: object | ||
properties: | ||
name: | ||
type: string |
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,2 @@ | ||
User: | ||
$ref: './model.yml' |
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,4 @@ | ||
type: object | ||
properties: | ||
name: | ||
type: string |
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