Last active
February 10, 2024 10:26
-
-
Save Darkle/7d038a6b458656be525eeda0f608b661 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let generateOpenApiClient () = | |
let openApiClientFileStr = | |
$""" | |
(** | |
⚠️ ⚠️ IMPORTANT! This file is auto-generated. You should _NOT_ edit this file by hand | |
as any changes you make will be overwritten! | |
**) | |
module OpenApiClient | |
open SwaggerProvider | |
let [<Literal>] OpenApiSchema = "http://localhost:{postGrestPort}" | |
type API = OpenApiClientProvider<OpenApiSchema> | |
let client = API.Client() | |
""" | |
let outPutFilePath = | |
Path.Combine(Directory.GetCurrentDirectory(), "generated", "OpenApiClient.fs") | |
File.WriteAllText(outPutFilePath, openApiClientFileStr.ToString()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment