
fsharp-giraffe-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
open Giraffe
module {{classname}}ServiceImplementation =
//#region Service implementation
type {{classname}}ServiceImpl() =
interface I{{classname}}Service with
{{#operations}}
{{#operation}}
member this.{{operationId}} ctx {{#allParams}}{{#-first}}args{{/-first}}{{/allParams}} =
{{#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 - 2025 Weber Informatics LLC | Privacy Policy