Skip to content

Commit

Permalink
Getting Started Doc #1 (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
justinyoo committed Oct 11, 2020
1 parent 629de24 commit 19c322e
Show file tree
Hide file tree
Showing 29 changed files with 472 additions and 389 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,27 @@ jobs:
name: Build and test
strategy:
matrix:
os: [ 'windows-latest' ]
dotnet: [ '3.1.401' ]
os: [ 'windows-latest', 'macos-latest', 'ubuntu-latest' ]
dotnet: [ '3.1.402' ]

runs-on: ${{ matrix.os }}

steps:
- name: Checkout the repository
uses: actions/checkout@v2

- name: Setup .NET SDK
- name: Setup .NET SDK 2.1 LTS
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ matrix.dotnet }}
dotnet-version: '2.1.x'

- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1.0.0
- name: Setup .NET SDK 3.1 LTS
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x'

# - name: Add MSBuild to PATH
# uses: microsoft/setup-msbuild@v1.0.0

- name: Restore NuGet packages
shell: pwsh
Expand Down
17 changes: 11 additions & 6 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,27 @@ jobs:
name: Build and test
strategy:
matrix:
os: [ 'windows-latest' ]
dotnet: [ '3.1.401' ]
os: [ 'windows-latest', 'macos-latest', 'ubuntu-latest' ]
dotnet: [ '3.1.402' ]

runs-on: ${{ matrix.os }}

steps:
- name: Checkout the repository
uses: actions/checkout@v2

- name: Setup .NET SDK
- name: Setup .NET SDK 2.1 LTS
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ matrix.dotnet }}
dotnet-version: '2.1.x'

- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1.0.0
- name: Setup .NET SDK 3.1 LTS
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x'

# - name: Add MSBuild to PATH
# uses: microsoft/setup-msbuild@v1.0.0

- name: Restore NuGet packages
shell: pwsh
Expand Down
20 changes: 15 additions & 5 deletions .github/workflows/release-all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
os: [ 'windows-latest' ]
dotnet: [ '3.1.401' ]
dotnet: [ '3.1.402' ]

runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -50,13 +50,23 @@ jobs:
- name: Checkout the repository
uses: actions/checkout@v2

- name: Setup .NET SDK
# - name: Setup .NET SDK
# uses: actions/setup-dotnet@v1
# with:
# dotnet-version: ${{ matrix.dotnet }}

- name: Setup .NET SDK 2.1 LTS
uses: actions/setup-dotnet@v1
with:
dotnet-version: '2.1.x'

- name: Setup .NET SDK 3.1 LTS
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ matrix.dotnet }}
dotnet-version: '3.1.x'

- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1.0.0
# - name: Add MSBuild to PATH
# uses: microsoft/setup-msbuild@v1.0.0

- name: Restore NuGet packages
shell: pwsh
Expand Down
24 changes: 18 additions & 6 deletions .github/workflows/release-cli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
matrix:
os: [ 'windows-latest' ]
node: [ 10 ]
dotnet: [ '3.1.401' ]
dotnet: [ '3.1.402' ]
targetFramework: [ 'netcoreapp3.1' ]
runtime: [ 'win-x64', 'linux-x64', 'osx-x64' ]

Expand Down Expand Up @@ -60,15 +60,27 @@ jobs:
# with:
# node-version: ${{ matrix.node }}

- name: Setup .NET SDK
# - name: Setup .NET SDK
# if: steps.release.outputs.module == 'cli'
# uses: actions/setup-dotnet@v1
# with:
# dotnet-version: ${{ matrix.dotnet }}

- name: Setup .NET SDK 2.1 LTS
if: steps.release.outputs.module == 'cli'
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ matrix.dotnet }}
dotnet-version: '2.1.x'

- name: Add MSBuild to PATH
- name: Setup .NET SDK 3.1 LTS
if: steps.release.outputs.module == 'cli'
uses: microsoft/setup-msbuild@v1.0.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x'

# - name: Add MSBuild to PATH
# if: steps.release.outputs.module == 'cli'
# uses: microsoft/setup-msbuild@v1.0.0

- name: Restore NuGet packages
if: steps.release.outputs.module == 'cli'
Expand Down Expand Up @@ -136,7 +148,7 @@ jobs:
matrix:
os: [ 'ubuntu-latest' ]
node: [ 10 ]
dotnet: [ '3.1.401' ]
dotnet: [ '3.1.402' ]
# targetFramework: [ 'net461', 'netcoreapp3.1' ]
# runtime: [ 'win-x64', 'linux-x64', 'osx-x64' ]

Expand Down
6 changes: 6 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"recommendations": [
"ms-azuretools.vscode-azurefunctions",
"ms-dotnettools.csharp"
]
}
33 changes: 33 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"version": "0.2.0",
"configurations": [
{
"name": "Azure Functions Launch",
"type": "coreclr",
"request": "attach",
"processId": "${command:azureFunctions.pickProcess}"
},
{
"name": "Azure Functions CLI Launch",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/src/Microsoft.Azure.WebJobs.Extensions.OpenApi.CLI/bin/Debug/netcoreapp3.1/azfuncopenapi.dll",
"args": [],
"cwd": "${workspaceFolder}/src/Microsoft.Azure.WebJobs.Extensions.OpenApi.CLI",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
}
]
}
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"azureFunctions.deploySubpath": "bin/Release/netcoreapp3.1/publish",
"azureFunctions.projectLanguage": "C#",
"azureFunctions.projectRuntime": "~3",
"debug.internalConsoleOptions": "neverOpen",
"azureFunctions.preDeployTask": "publish"
}
89 changes: 89 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "clean",
"command": "dotnet",
"args": [
"clean",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"type": "process",
"problemMatcher": "$msCompile"
},
{
"label": "build",
"command": "dotnet",
"args": [
"build",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"type": "process",
"dependsOn": "clean",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": "$msCompile"
},
{
"label": "clean release",
"command": "dotnet",
"args": [
"clean",
"--configuration",
"Release",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"type": "process",
"problemMatcher": "$msCompile"
},
{
"label": "publish",
"command": "dotnet",
"args": [
"publish",
// "${workspaceFolder}/src/Microsoft.Azure.WebJobs.Extensions.OpenApi/Microsoft.Azure.WebJobs.Extensions.OpenApi.csproj",
// "${workspaceFolder}/src/Microsoft.Azure.WebJobs.Extensions.OpenApi.AppSettings/Microsoft.Azure.WebJobs.Extensions.OpenApi.AppSettings.csproj",
"${workspaceFolder}/src/Microsoft.Azure.WebJobs.Extensions.OpenApi.CLI/Microsoft.Azure.WebJobs.Extensions.OpenApi.CLI.csproj",
// "${workspaceFolder}/src/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core/Microsoft.Azure.WebJobs.Extensions.OpenApi.Core.csproj",
"--configuration",
"Release",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"type": "process",
"dependsOn": "clean release",
"problemMatcher": "$msCompile"
},
{
"label": "watch",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"${workspaceFolder}/src/Microsoft.Azure.WebJobs.Extensions.OpenApi.CLI/Microsoft.Azure.WebJobs.Extensions.OpenApi.CLI.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"type": "func",
"dependsOn": "build",
"options": {
// "cwd": "${workspaceFolder}/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V2IoC/bin/Debug/netcoreapp2.1"
// "cwd": "${workspaceFolder}/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V2Static/bin/Debug/netcoreapp2.1"
"cwd": "${workspaceFolder}/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V3IoC/bin/Debug/netcoreapp3.1"
// "cwd": "${workspaceFolder}/samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V3Static/bin/Debug/netcoreapp3.1"
},
"command": "host start",
"isBackground": true,
"problemMatcher": "$func-watch"
}
]
}
33 changes: 32 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,36 @@
# Azure Functions Open API Extension #

# Contributing
## Acknowledgement ##

* [Swagger UI](https://github.com/swagger-api/swagger-ui) version used for this library is [3.20.5](https://github.com/swagger-api/swagger-ui/releases/tag/v3.20.5) under the [Apache 2.0 license](https://opensource.org/licenses/Apache-2.0).


## Getting Started ##

* [Enable Open API documents to your Azure Functions HTTP Trigger](docs/enable-open-api-endpoints.md)
* [Integrating Open API-enabled Azure Functions to Azure API Management](docs/integrate-with-apim.md)
* [Integrating Open API-enabled Azure Functions to Power Platform](docs/integrate-with-powerplatform.md)


## Sample Azure Function Apps with Open API Metadata Enabled ##

* [Function App v2 static](samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V2Static)
* [Function App v2 IoC](samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V2IoC)
* [Function App v3 static](samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V3Static)
* [Function App v3 IoC](samples/Microsoft.Azure.WebJobs.Extensions.OpenApi.FunctionApp.V3IoC)


## Azure Functions V1 Support ##

This library supports Azure Functions V2 and onwards. If you still want to get your v1 app supported, find the [community contribution](https://github.com/aliencube/AzureFunctions.Extensions).


## Issues? ##

While using this library, if you find any issue, please raise an issue on the [Issue](https://github.com/Azure/azure-functions-openapi-extension/issues) page.


## Contributing ##

This project welcomes contributions and suggestions. Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
Expand Down
Loading

0 comments on commit 19c322e

Please sign in to comment.