Skip to content

Function Schema from Data Annotation #429

Answered by StephenHodgson
rdennyson asked this question in Q&A
Discussion options

You must be logged in to vote

yes. See unit tests:

internal static class WeatherService
{
internal enum WeatherUnit
{
Celsius,
Fahrenheit
}
[Function("Get the current weather in a given location.")]
public static async Task<string> GetCurrentWeatherAsync(
[FunctionParameter("The location the user is currently in.")] string location,
[FunctionParameter("The units the user has requested temperature in. Typically this is based on the users location.")] WeatherUnit unit)
{
var temp = new Random().Next(10, 40);
temp = unit switch
{
Weather…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by StephenHodgson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants
Converted from issue

This discussion was converted from issue #425 on March 03, 2025 16:28.