Skip to content

Commit 9bd7a80

Browse files
committed
fix: fixed spec not caching
1 parent 1232ea0 commit 9bd7a80

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

openapi-generator-annotations/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,3 +165,5 @@ Network Trash Folder
165165
Temporary Items
166166
.apdisk
167167
.idea/
168+
169+
**/*.mocks.dart

openapi-generator/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,4 +169,5 @@ example/.dart_tool
169169

170170
# Generated test output
171171
test/specs/test-cached.json
172-
test/specs/localstack/**
172+
test/specs/localstack/**
173+
**/*.mocks.dart

openapi-generator/lib/src/gen_on_spec_changes.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,9 @@ Future<void> cacheSpec({
186186
if (outputFile.existsSync()) {
187187
log('Found cached asset updating');
188188
} else {
189+
if (!outputFile.parent.existsSync()) {
190+
outputFile.parent.createSync(recursive: true);
191+
}
189192
log('No previous openapi-generated cache found. Creating cache');
190193
}
191194

0 commit comments

Comments
 (0)