-1

I'm implementing some versioning in my Minimal API for .NET 8 and I've hit a bit of a snag.

My documentation won't load the v2 API doc into Swagger when I run the application.

I have this Swagger setup:

enter image description here

and a bit further, I have my versioning set up to use URL versioning (that is policy currently here which is fine):

enter image description here

For the purposes of testing I have hardcoded the v2 into the URL on this extension but this creates the group (the individual mappings are then added afterwards for each file):

enter image description here

My issue here isn't that it's not adding it, if I navigate to v2/swagger.json at runtime I get the version file fine with the definition in it, but on /swagger only the v1 is loaded and there is no way to switch to the v2 to view the created endpoints:

enter image description here

There's no v2 there, either in the dropdown at the top or listed on the left.

What am I missing?

1
  • 1
    Please edit your question to convert images into text, and use a code block for any code you have. Readers can then search the text or run the code to reproduce your issue. Commented 9 hours ago

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.