Testing Azure Functions with Postman and Swagger

A new feature (preview) in Azure Functions is API Definition. This feature allows you to use the OpenAPI specification (aka Swagger) to document the functionality of your functions and/or endpoints. Checkout John Papa & I talk about using Swagger for ASP.NET Core on Pluralsight in Play by Play - Understanding API Functionality Through Swagger The documentation and a walkthrough of Creating OpenAPI 2.0 (Swagger) Metadata for a Function App (Preview) are available on docs.microsoft.com. Testing your function After you have your api defined, copy the endpoint in the API Definition URL box to use to import into Postman. Open Postman, click the Import button. Select Import from Link and paste your definition endpoint. Postman reads...


Azure functions - Just the CLI, hold the GUI, add some git

When sitting down to get started on a project, the start and stops of setting this and that up can be a non-starter. Sometimes, ok almost always, I just want check in code and have the build and deploy just happen. I'm a very big fan of CLI tooling. If I can fire up a bash prompt and get started, you've won me over. The .NET Core team continues to improve the command line tooling experience for all platforms with dotnet new and if you're pushing your apps to the cloud; the Azure 2.0 CLI is on point for getting stuff done. Azure CLI - The Azure CLI 2.0 is Azure's new command line experience for managing Azure...


Don't lose your swagger with dotnet build

See GitHub Issue #795 for the details and discussion. One of the undocumented changes of converting from project.json to csproj, was the <DocumentationFile> no longer automatically copied to the output folder during the build or publish process. There have been multiple solutions, both pre and post publish scripts. However, understanding how MSBUILD works and finding the simplest way is key. Thanks to Eric Erhardt's latest comment here I think that this is the cleanest way. Add the following snippet to the .csproj to enable the copy of the documentation file to the output folder. It supports the F5 options as well as the dotnet build / dotnet publish CLI commands. Another important option tested was the ability to...


New Role at Microsoft - Cloud Developer Advocate

Taking on a new role as a Sr. Cloud Developer Advocate withing the Cloud and Enterprise group. What does that mean? Talking to the community about the technologies that I love; ASP.NET, ASP.NET Core, Docker, services and how these can best be run on Azure and what we as a community can do to make it better. docs.microsoft.com, where I have spent my time since joining Microsoft, is a very important part of what we are moving to accomplish. With a new look at documentation for all of the products; Azure, ASP.NET/ASP.NET Core, Visual Studio and many more products continue to migrate over to the new Open Source platform. I will continue to...


dotnet new angular to Azure with Docker using CLI

Visual Studio 2017 has been released and the features are great for Windows developers. However along with it comes .NET Core 1.0 tooling and large improvements to the command line experience for macOS and Linux users developing ASP.NET Core applications. One of the prevalent features shown off in VS 2017 is the Docker support and capabilities to push to Azure App Service. Using the Azure CLI 2.0, Docker and .NET CLI these same capabilities can be accomplished without friction and with just as much success and satisfaction. dotnet new The new command now is driven by a whole new template system. A number of new templates, including webapi, are available with the ability to install and create...