Skip to content

Commit 74e3b28

Browse files
committed
Resolves #24
1 parent 795688a commit 74e3b28

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,4 @@ Source/OpenApiDelphiGen.res
104104
Source/version.res
105105
Tests/Win32/Debug/dunit.ini
106106
Tests/OpenApiDelphiGenTests.res
107+
*.dsv

Source/OpenApiGen.V3.Analyzer.pas

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@ procedure TOpenApiAnalyzer.Analyze(ADocument: TOpenApiDocument);
5757
// Build meta information
5858
MetaClient.Clear;
5959

60-
for Schema in Document.Components.Schemas do
61-
MetaTypeFromSchema(Schema.Value, Schema.Key, TListType.ltAuto);
60+
if (Document.Components <> nil) and (Document.Components.Schemas <> nil) then
61+
for Schema in Document.Components.Schemas do
62+
MetaTypeFromSchema(Schema.Value, Schema.Key, TListType.ltAuto);
6263
for Path in Document.Paths do
6364
ProcessPathItem(Path.Key, Path.Value);
6465

0 commit comments

Comments
 (0)