Skip to main content

Documentation for the fsharp-giraffe-server Generator

METADATA

PropertyValueNotes
generator namefsharp-giraffe-serverpass this to the generate command after -g
generator stabilityBETA
generator typeSERVER
generator languageF#
generator default templating enginemustache
helpTxtGenerates a F# Giraffe server (beta).

CONFIG OPTIONS

These options may be applied as additional-properties (cli) or configOptions (plugins). Refer to configuration docs for more details.

OptionDescriptionValuesDefault
buildTargetTarget the build for a program or library.program
generateBodyGenerates method body.true
licenseNameThe name of the licenseNoLicense
licenseUrlThe URL of the licensehttp://localhost
packageAuthorsSpecifies Authors property in the .NET Core project file.OpenAPI
packageCopyrightSpecifies an AssemblyCopyright for the .NET Framework global assembly attributes stored in the AssemblyInfo file.No Copyright
packageGuidThe GUID that will be associated with the C# projectnull
packageNameF# module name (convention: Title.Case).OpenAPI
packageTitleSpecifies an AssemblyTitle for the .NET Framework global assembly attributes stored in the AssemblyInfo file.OpenAPI Library
packageVersionF# package version.1.0.0
returnICollectionReturn ICollection<T> instead of the concrete type.false
sortParamsByRequiredFlagSort method arguments to place required parameters before optional parameters.true
sourceFoldersource folder for generated codeOpenAPI/src
useCollectionDeserialize array types to Collection<T> instead of List<T>.false
useDateTimeOffsetUse DateTimeOffset to model date-time propertiesfalse
useSwashbuckleUses the Swashbuckle.AspNetCore NuGet package for documentation.false

IMPORT MAPPING

Type/AliasImports
IDictionarySystem.Collections.Generic

INSTANTIATION TYPES

Type/AliasInstantiated By
arraylist
listlist
mapIDictionary

LANGUAGE PRIMITIVES

  • Collection
  • DataTimeOffset
  • DateTime
  • Dictionary
  • Double
  • ICollection
  • Int32
  • Int64
  • List
  • String
  • System.IO.Stream
  • bool
  • byte[]
  • char
  • decimal
  • dict
  • double
  • float
  • float32
  • int
  • int16
  • int64
  • list
  • nativeint
  • obj
  • seq
  • single
  • string
  • uint16
  • uint32
  • uint64
  • unativeint

RESERVED WORDS

  • abstract
  • and
  • as
  • assert
  • async
  • await
  • base
  • begin
  • bool
  • break
  • byte
  • case
  • catch
  • char
  • checked
  • class
  • const
  • continue
  • decimal
  • default
  • delegate
  • do
  • done
  • double
  • downcast
  • downto
  • dynamic
  • elif
  • else
  • end
  • enum
  • event
  • exception
  • explicit
  • extern
  • false
  • finally
  • fixed
  • float
  • for
  • foreach
  • fun
  • function
  • if
  • in
  • inherit
  • inline
  • int
  • interface
  • internal
  • is
  • lazy
  • let
  • let!
  • localVarFileParams
  • localVarFormParams
  • localVarHeaderParams
  • localVarHttpContentType
  • localVarHttpContentTypes
  • localVarHttpHeaderAccept
  • localVarHttpHeaderAccepts
  • localVarPath
  • localVarPathParams
  • localVarPostBody
  • localVarQueryParams
  • localVarResponse
  • localVarStatusCode
  • lock
  • match
  • match!
  • member
  • module
  • mutable
  • namespace
  • new
  • not
  • null
  • of
  • open
  • option
  • or
  • override
  • params
  • private
  • public
  • raise
  • rec
  • return
  • return!
  • sealed
  • select
  • static
  • string
  • struct
  • then
  • to
  • true
  • try
  • type
  • upcast
  • use
  • use!
  • val
  • void
  • volatile
  • when
  • while
  • with
  • yield
  • yield!

FEATURE SET

Client Modification Feature

NameSupportedDefined By
BasePathToolingExtension
AuthorizationsToolingExtension
UserAgentToolingExtension
MockServerToolingExtension

Data Type Feature

NameSupportedDefined By
CustomOAS2,OAS3
Int32OAS2,OAS3
Int64OAS2,OAS3
FloatOAS2,OAS3
DoubleOAS2,OAS3
DecimalToolingExtension
StringOAS2,OAS3
ByteOAS2,OAS3
BinaryOAS2,OAS3
BooleanOAS2,OAS3
DateOAS2,OAS3
DateTimeOAS2,OAS3
PasswordOAS2,OAS3
FileOAS2
Uuid
ArrayOAS2,OAS3
NullOAS3
AnyTypeOAS2,OAS3
ObjectOAS2,OAS3
MapsToolingExtension
CollectionFormatOAS2
CollectionFormatMultiOAS2
EnumOAS2,OAS3
ArrayOfEnumToolingExtension
ArrayOfModelToolingExtension
ArrayOfCollectionOfPrimitivesToolingExtension
ArrayOfCollectionOfModelToolingExtension
ArrayOfCollectionOfEnumToolingExtension
MapOfEnumToolingExtension
MapOfModelToolingExtension
MapOfCollectionOfPrimitivesToolingExtension
MapOfCollectionOfModelToolingExtension
MapOfCollectionOfEnumToolingExtension

Documentation Feature

NameSupportedDefined By
ReadmeToolingExtension
ModelToolingExtension
ApiToolingExtension

Global Feature

NameSupportedDefined By
HostOAS2,OAS3
BasePathOAS2,OAS3
InfoOAS2,OAS3
SchemesOAS2,OAS3
PartialSchemesOAS2,OAS3
ConsumesOAS2
ProducesOAS2
ExternalDocumentationOAS2,OAS3
ExamplesOAS2,OAS3
XMLStructureDefinitionsOAS2,OAS3
MultiServerOAS3
ParameterizedServerOAS3
ParameterStylingOAS3
CallbacksOAS3
LinkObjectsOAS3

Parameter Feature

NameSupportedDefined By
PathOAS2,OAS3
QueryOAS2,OAS3
HeaderOAS2,OAS3
BodyOAS2
FormUnencodedOAS2
FormMultipartOAS2
CookieOAS3

Schema Support Feature

NameSupportedDefined By
SimpleOAS2,OAS3
CompositeOAS2,OAS3
PolymorphismOAS2,OAS3
UnionOAS3
allOfOAS2,OAS3
anyOfOAS3
oneOfOAS3
notOAS3

Security Feature

NameSupportedDefined By
BasicAuthOAS2,OAS3
ApiKeyOAS2,OAS3
OpenIDConnectOAS3
BearerTokenOAS3
OAuth2_ImplicitOAS2,OAS3
OAuth2_PasswordOAS2,OAS3
OAuth2_ClientCredentialsOAS2,OAS3
OAuth2_AuthorizationCodeOAS2,OAS3
SignatureAuthOAS3
AWSV4SignatureToolingExtension

Wire Format Feature

NameSupportedDefined By
JSONOAS2,OAS3
XMLOAS2,OAS3
PROTOBUFToolingExtension
CustomOAS2,OAS3