Rob Bowman
Rob Bowman

Reputation: 8711

Azure functions CLI latest templates

I'd like to create a new Azure Function that makes use of a template for OpenApi support as described here

Since I'm using a Mac rather than Windows, I'd like to know how I can make the latest templates available from the CLI or VS Code.

I tried

func new --template "Http Trigger with OpenAPI" --name MyHttpTrigger

But that gave

Unknown template 'HttpTriggerwithOpenAPI' (Parameter 'templateName')

Upvotes: 1

Views: 1330

Answers (1)

anon
anon

Reputation:

AFAIK, Before Creating the Azure Function with the cmdlet func new ..., check if the required template is available in the language (stack) you're going to create it.

  1. func templates list - Run this cmdlet to see what templates available according to specific language runtime (C#, JavaScript) you are creating.

enter image description here

If the template is available, you can create that on the Azure Functions Project using the func new cmdlet.

Refer to the func new cmdlet MS Doc for more information.

Upvotes: 2

Related Questions