dotnet / dotnet/aspnetcore

Strange behavior of minimal api when using it in fsharp

Open
#46,551 3 comments 1 reaction 0 assignees View on GitHub
area-minimal
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 6h
Merged PRs (30d)
290

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Describe the bug

Hello! I am trying to use minimal api from fsharp, and encountered a following problem:

https://gist.github.com/vshapenko/5c6ae1c0cb005dddd1325caca266ecd4

First method in gist above works as intended, second and third do not pass value to handler.

Can somebody explain this strange behavior?

### Expected Behavior

All methods returns input string

### Steps To Reproduce

Run the gist above, invoke endpoints

### Exceptions (if any)

_No response_

### .NET Version

7.0.100

### Anything else?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.