-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use separate resolvers for each file in join (#1291)
- Loading branch information
1 parent
c4ae8fa
commit 4769ca5
Showing
8 changed files
with
162 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@redocly/openapi-core': patch | ||
'@redocly/cli': patch | ||
--- | ||
|
||
Fixed an issue with nested refs in the `join` command. |
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,16 @@ | ||
openapi: 3.0.3 | ||
tags: | ||
- name: CreateBar | ||
description: Create a new Bar | ||
paths: | ||
/bar/: | ||
post: | ||
summary: Create a single bar | ||
operationId: createBar | ||
responses: | ||
'200': | ||
description: One single bar | ||
content: | ||
application/json: | ||
schema: | ||
$ref: './nested/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,25 @@ | ||
openapi: 3.0.3 | ||
info: | ||
title: Sample API | ||
description: My sample api | ||
version: 0.0.1 | ||
license: | ||
name: 'Internal' | ||
url: 'https://mycompany.com/license' | ||
tags: | ||
- name: GetSingleFoo | ||
description: Get a single foo | ||
- name: Foo | ||
description: All foo operations | ||
paths: | ||
/foo/{id}: | ||
get: | ||
summary: Returns a single foo | ||
operationId: getFoo | ||
responses: | ||
'200': | ||
description: One single Food | ||
content: | ||
application/json: | ||
schema: | ||
$ref: './nested/Response.yaml' |
6 changes: 6 additions & 0 deletions
6
__tests__/join/multi-references-to-one-file/nested/FooObject.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 @@ | ||
type: object | ||
properties: | ||
x: | ||
type: string | ||
y: | ||
type: string |
14 changes: 14 additions & 0 deletions
14
__tests__/join/multi-references-to-one-file/nested/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,14 @@ | ||
type: object | ||
required: | ||
- id | ||
- name | ||
properties: | ||
id: | ||
type: string | ||
format: uuid | ||
name: | ||
type: string | ||
description: | ||
type: string | ||
subFoo: | ||
$ref: './FooObject.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,93 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`E2E join without options test: multi-references-to-one-file 1`] = ` | ||
openapi: 3.0.3 | ||
info: | ||
title: Sample API | ||
description: My sample api | ||
version: 0.0.1 | ||
license: | ||
name: Internal | ||
url: https://mycompany.com/license | ||
tags: | ||
- name: GetSingleFoo | ||
description: Get a single foo | ||
x-displayName: GetSingleFoo | ||
- name: Foo | ||
description: All foo operations | ||
x-displayName: Foo | ||
- name: foo_other | ||
x-displayName: other | ||
- name: CreateBar | ||
description: Create a new Bar | ||
x-displayName: CreateBar | ||
- name: bar_other | ||
x-displayName: other | ||
paths: | ||
/foo/{id}: | ||
get: | ||
summary: Returns a single foo | ||
operationId: getFoo | ||
responses: | ||
'200': | ||
description: One single Food | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Response' | ||
tags: | ||
- foo_other | ||
/bar/: | ||
post: | ||
summary: Create a single bar | ||
operationId: createBar | ||
responses: | ||
'200': | ||
description: One single bar | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Response' | ||
tags: | ||
- bar_other | ||
components: | ||
schemas: | ||
FooObject: | ||
type: object | ||
properties: | ||
x: | ||
type: string | ||
'y': | ||
type: string | ||
Response: | ||
type: object | ||
required: | ||
- id | ||
- name | ||
properties: | ||
id: | ||
type: string | ||
format: uuid | ||
name: | ||
type: string | ||
description: | ||
type: string | ||
subFoo: | ||
$ref: '#/components/schemas/FooObject' | ||
x-tagGroups: | ||
- name: foo | ||
tags: | ||
- GetSingleFoo | ||
- Foo | ||
- foo_other | ||
description: My sample api | ||
- name: bar | ||
tags: | ||
- CreateBar | ||
- bar_other | ||
openapi.yaml: join processed in <test>ms | ||
`; |
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
4769ca5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage report
Test suite run success
636 tests passing in 93 suites.
Report generated by 🧪jest coverage report action from 4769ca5