question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Minimal API Versioning - Endpoint not found

See original GitHub issue

As per description in https://fast-endpoints.com/docs/api-versioning#mark-endpoint-with-a-version, we tried to enable versioning in existing minimal API.

In Configuration we put

app.UseFastEndpoints(c =>
{
    c.Versioning.Prefix = "v";
    c.Versioning.DefaultVersion = 1;
});

And in Endpoint Configuration

public override void Configure()
    {
       // Before Versioning
        Post("v1/accounts/{@id}/status", x => new {x.Id}); 
        // After Versioning
        Post("accounts/{@id}/status", x => new {x.Id}); 
        Version(1);
    }

After enabling Versioning, I get 404 when I hit POST http://localhost:5000/v1/accounts/1/status

I don’t know where I am failing…

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
dj-nitehawkcommented, Nov 17, 2022

see SuffixedVersion at the bottom of the page you linked above.

0reactions
SViradiya-MarutiTechcommented, Nov 17, 2022

Ohh I missed it , Thanks buddy. 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Asp.Versioning Libraries do not add Minimal API ...
I wish to be able to systematically add Swagger Endpoints based on which endpoints exist in my project, regardless of it being a...
Read more >
Issue with IsApiVersionNeutral in asp.net minimal api ...
Hi I am trying to implement versioning in asp.net core minimal api (net7.0). But I am seeing some url access issues with certain...
Read more >
How to version minimal APIs in ASP.NET Core 6
Follow these steps to implement API versioning in minimal Web API endpoints using ASP.NET Core 6.
Read more >
Tutorial: Create a minimal API with ASP.NET Core
Learn how to build a minimal API with ASP.NET Core.
Read more >
API Versioning with ASP.NET Core 6.0 Minimal APIs
This post is about how to implement api versioning in ASP.NET Core 6.0 Minimal APIs. Earlier Minimal APIs versioning was not supported.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found