fsharp-functions-server.ServiceImpl.mustache Maven / Gradle / Ivy
namespace {{packageName}}
{{#imports}}
{{#import}}
open {{import}}
{{/import}}
{{/imports}}
open {{classname}}HandlerParams
open {{classname}}ServiceInterface
open System.Collections.Generic
open System
module {{classname}}ServiceImplementation =
//#region Service implementation
type {{classname}}ServiceImpl() =
interface I{{classname}}Service with
{{#operations}}
{{#operation}}
member this.{{operationId}} {{^hasBodyParam}}(){{/hasBodyParam}}{{#hasBodyParam}}(parameters:{{operationId}}BodyParams){{/hasBodyParam}} =
{{#responses}}
{{#-first}}
{{#hasMore}}
if true then
{{/hasMore}}
{{/-first}}
{{^-first}}
{{#hasMore}}
else if true then
{{/hasMore}}
{{^hasMore}}
else
{{/hasMore}}
{{/-first}}
let content = "{{message}}" {{#dataType}}:> obj :?> {{{.}}} // this cast is obviously wrong, and is only intended to allow generated project to compile {{/dataType}}
{{operationId}}{{#isDefault}}Default{{/isDefault}}StatusCode{{^isDefault}}{{code}}{{/isDefault}} { content = content }
{{/responses}}
{{/operation}}
{{/operations}}
//#endregion
let {{classname}}Service = {{classname}}ServiceImpl() :> I{{classname}}Service
© 2015 - 2024 Weber Informatics LLC | Privacy Policy