-
-
Notifications
You must be signed in to change notification settings - Fork 458
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mirror directory structure if output is a directory (#1345)
* mirror directory structure if output is a directory * add a changeset * move mkdir to appropriate place, create directory structure if we are dealing with multiple files or output directory and file paths match (which indicates it's a directory) * remove leftover * fix weird output paths * add glob tests * fix remaining test case * ignore test output directory * run prettier * make conditions more readable
- Loading branch information
Showing
9 changed files
with
122 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"openapi-typescript": patch | ||
--- | ||
|
||
Mirror directory structure of input files if output is a directory to prevent overwriting the same file again and again. |
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 |
---|---|---|
|
@@ -2,3 +2,5 @@ | |
.astro | ||
dist | ||
node_modules | ||
|
||
packages/openapi-typescript/test/fixtures/cli-outputs/out |
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
8 changes: 8 additions & 0 deletions
8
packages/openapi-typescript/test/fixtures/cli-outputs/file-a.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 @@ | ||
openapi: "3.0" | ||
info: | ||
title: test file a | ||
version: "1.0" | ||
paths: | ||
/endpoint: | ||
get: | ||
description: OK |
8 changes: 8 additions & 0 deletions
8
packages/openapi-typescript/test/fixtures/cli-outputs/file-b.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 @@ | ||
openapi: "3.0" | ||
info: | ||
title: test file b | ||
version: "1.0" | ||
paths: | ||
/endpoint: | ||
get: | ||
description: OK |
8 changes: 8 additions & 0 deletions
8
packages/openapi-typescript/test/fixtures/cli-outputs/nested/deep/file-e.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 @@ | ||
openapi: "3.0" | ||
info: | ||
title: test file e | ||
version: "1.0" | ||
paths: | ||
/endpoint: | ||
get: | ||
description: OK |
8 changes: 8 additions & 0 deletions
8
packages/openapi-typescript/test/fixtures/cli-outputs/nested/file-c.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 @@ | ||
openapi: "3.0" | ||
info: | ||
title: test file c | ||
version: "1.0" | ||
paths: | ||
/endpoint: | ||
get: | ||
description: OK |
8 changes: 8 additions & 0 deletions
8
packages/openapi-typescript/test/fixtures/cli-outputs/nested/file-d.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 @@ | ||
openapi: "3.0" | ||
info: | ||
title: test file d | ||
version: "1.0" | ||
paths: | ||
/endpoint: | ||
get: | ||
description: OK |