serverless / serverless-azure-functions

Serverless Azure Functions Plugin – Add Azure Functions support to the Serverless Framework
MIT License
266 stars 161 forks source link

The bindings for signalR is not getting assigned for the negotiate function #674

Open Vikas252 opened 1 year ago

Vikas252 commented 1 year ago

This is a Bug Report

Expected function,json

{
  "disabled": false,
  "bindings": [
    {
      "type": "httpTrigger",
      "direction": "in",
      "name": "req",
      "route": "negotiate",
      "authLevel": "function",
      "methods": ["POST"]
    },
    {
      "type": "http",
      "direction": "out",
      "name": "res"
    },
    {
      "type": "signalRConnectionInfo",
      "name": "connectionInfo",
      "hubName": "serverless",
      "connectionStringSetting": "AzureSignalRConnectionString",
      "direction": "in"
    }
  ],
  "entryPoint": "negotiate",
  "scriptFile": "../dist/server.js"
}

Current function.json when deployed:

{
  "disabled": false,
  "bindings": [
    {
      "type": "httpTrigger",
      "direction": "in",
      "name": "req",
      "route": "negotiate",
      "authLevel": "function",
      "methods": ["POST"]
    },
    {
      "type": "http",
      "direction": "out",
      "name": "res"
    }
  ],
  "entryPoint": "negotiate",
  "scriptFile": "../dist/server.js"
}

serverless.yml file


negotiate:
    handler: dist/server.negotiate
    events:
      - http: true
        route: negotiate
        methods:
          - POST
    outputs:
      connectionInfo:
        type: signalRConnectionInfo
        name: connectionInfo
        hubName: serverless
        connectionStringSetting: AzureSignalRConnectionString
        direction: in

Description

Additional Data

olivierbeauve commented 1 year ago

Hi!

I have the same problem.. Did you find a solution ?

Thank you !