forked from OpenAPITools/openapi-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add F# Functions server generator (OpenAPITools#3933)
* cherry pick F# Functions generator test fix fix template paths replace giraffe sample * update doc
- Loading branch information
Showing
52 changed files
with
2,825 additions
and
122 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/sh | ||
|
||
SCRIPT="$0" | ||
|
||
while [ -h "$SCRIPT" ] ; do | ||
ls=$(ls -ld "$SCRIPT") | ||
link=$(expr "$ls" : '.*-> \(.*\)$') | ||
if expr "$link" : '/.*' > /dev/null; then | ||
SCRIPT="$link" | ||
else | ||
SCRIPT=$(dirname "$SCRIPT")/"$link" | ||
fi | ||
done | ||
|
||
if [ ! -d "${APP_DIR}" ]; then | ||
APP_DIR=$(dirname "$SCRIPT")/.. | ||
APP_DIR=$(cd "${APP_DIR}"; pwd) | ||
fi | ||
|
||
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" | ||
|
||
if [ ! -f "$executable" ] | ||
then | ||
mvn clean package | ||
fi | ||
|
||
# if you've executed sbt assembly previously it will use that instead. | ||
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties" | ||
ags="$@ generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g fsharp-functions -o samples/server/petstore/fsharp-functions" | ||
|
||
java ${JAVA_OPTS} -jar ${executable} ${ags} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar | ||
|
||
If Not Exist %executable% ( | ||
mvn clean package | ||
) | ||
|
||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties | ||
set ags=generate --artifact-id "fsharp-functions-petstore-server" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g fsharp-functions -o samples\server\petstore\fsharp-functions | ||
|
||
java %JAVA_OPTS% -jar %executable% %ags% |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
--- | ||
id: generator-opts-server-fsharp-functions | ||
title: Config Options for fsharp-functions | ||
sidebar_label: fsharp-functions | ||
--- | ||
|
||
| Option | Description | Values | Default | | ||
| ------ | ----------- | ------ | ------- | | ||
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| | ||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| | ||
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| | ||
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| | ||
|licenseUrl|The URL of the license| |http://localhost| | ||
|licenseName|The name of the license| |NoLicense| | ||
|packageCopyright|Specifies an AssemblyCopyright for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |No Copyright| | ||
|packageAuthors|Specifies Authors property in the .NET Core project file.| |OpenAPI| | ||
|packageTitle|Specifies an AssemblyTitle for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |OpenAPI Library| | ||
|packageName|F# module name (convention: Title.Case).| |OpenAPI| | ||
|packageVersion|F# package version.| |1.0.0| | ||
|packageGuid|The GUID that will be associated with the C# project| |null| | ||
|sourceFolder|source folder for generated code| |OpenAPI/src| |
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
Oops, something went wrong.