Skip to content

Commit 18fc1ac

Browse files
authored
Merge pull request #18 from MobileTeleSystems/fix_jsonschema
Fix load jsonschema with refs
2 parents a7a79fd + dfef5ae commit 18fc1ac

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/ApiCodeGenerator.Core/ApiDocumentProvider.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ public ApiDocumentProvider(IFileProvider fileProvider, HttpClient httpClient)
106106
}
107107
}
108108

109+
data.Schema = data.Schema.Replace("#/definitions/", $"#/components/schemas/{data.Name}/definitions/");
109110
var content = $"{{\"openapi\":\"3.0.0\",\"components\":{{\"schemas\":{{\"{data.Name}\":{data.Schema}}}}}}}";
110111
return FromContent(content, null);
111112
}

0 commit comments

Comments
 (0)