• Guides
  • Api Reference
  • FAQ
  • Guides
  • Overview
  • Upgrading to 1.0
Show / Hide Table of Contents
  • Overview
    • Introduction
    • Getting Started
    • Philosophy
    • FAQ
    • Upgrading to 1.0
  • Triggers
    • HTTP Triggers
      • Overview
      • Routing
      • Responses
      • Authorization
      • Claims Mapping
      • Headers
      • Swagger / OpenAPI
    • Service Bus Triggers
      • Queues
      • Topic and Subscriptions
      • Message Properties
      • Message Sessions
    • Cosmos DB
      • Overview
      • Error Handling
    • SignalR
    • Timer Triggers
    • Azure Storage Triggers
      • Queues
      • Blobs
    • Event Hub Triggers
  • Output Bindings
  • Cross Cutting Concerns
    • Connection Strings
    • IoC Containers
    • Logging
    • Trigger Contexts
    • Validation
    • Serialization
    • Suggested Solution Structure
  • Contributing
    • Compiling
    • Debugging

Upgrading to 1.0

If you're using a beta release there are a couple of changes required to adopt the 1.0 and later releases.

HTTP Triggers

Routes

In versions prior to 1.0 Function Monkey relied on proxies to shape HTTP trigger endpoints into friendly routes - the reasons why are lost to the mists of time I'm afraid!

In version 1.0 the route property is used on the HttpTriggerAttribute and in the function.json as per this guidance here.

That does mean that by default 'api' will be added anbd used as a prefix for all your routes by the Azure Functions runtime and that will require you to address this in your routes. The easiest way to update this is simply to remove the prefix by editing the host.json file as shown in the example below:

{
  "version": "2.0",
  "extensions": {
    "http": {
      "routePrefix": ""
    }
  }
}

Response Handlers

Previously it was not possible to use a response handler to shape the output of validation failures - this is addressed in version 1.0 by the addition of the CreateValidationFailureResponse method to the IHttpResponseHandler interface.

If you've created custom response handlers you will need to implement this method on your classes, as per the other methods you can return null to have Function Monkey create its default response, or you can return an IActionResult to tailor the response.

  • Improve this Doc
  • 0 Comments
In This Article
  • HTTP Triggers
    • Routes
    • Response Handlers
Back to top Copyright © 2018 James Randall