Skip to content

Commit 80b88a0

Browse files
committed
Fix load jsonschema with refs
1 parent a7a79fd commit 80b88a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ApiCodeGenerator.Core/ApiDocumentProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public ApiDocumentProvider(IFileProvider fileProvider, HttpClient httpClient)
105105
return result;
106106
}
107107
}
108-
108+
data.Schema = data.Schema.Replace("#/definitions/", $"#/components/schemas/{data.Name}/definitions/");
109109
var content = $"{{\"openapi\":\"3.0.0\",\"components\":{{\"schemas\":{{\"{data.Name}\":{data.Schema}}}}}}}";
110110
return FromContent(content, null);
111111
}

0 commit comments

Comments
 (0)