Skip to content

Commit

Permalink
Merge pull request #18 from MobileTeleSystems/fix_jsonschema
Browse files Browse the repository at this point in the history
Fix load jsonschema with refs
  • Loading branch information
genusP authored Dec 2, 2024
2 parents a7a79fd + dfef5ae commit 18fc1ac
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/ApiCodeGenerator.Core/ApiDocumentProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ public ApiDocumentProvider(IFileProvider fileProvider, HttpClient httpClient)
}
}

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

0 comments on commit 18fc1ac

Please sign in to comment.