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.

Changes for .NET 7 minimal API scaffolders

See original GitHub issue
  • Add whitespace route group definition and first API definition
  • Remove all Produces extension method calls (they aren’t needed when using TypedResults or returning the object to be serialized directly)
  • Remove all calls to WithTags from API definitions and instead have single call on the group definition
  • Move call to WithOpenApi from group definition to API definitions (that method is designed to allow editing a specific OpenApiOperation so is more useful on the endpoint definitions directly IMO)
  • Update non-EF Core scaffolder to also use TypedResults
  • Question: Do we want to add an option for using strongly typed results?
    • My thinking is “yes” because they represent an alternate of writing the API but not necessarily a “better” way and some folks may prefer using Results and the Produces approach

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
DamianEdwardscommented, Oct 18, 2022

Capturing feedback from meeting today:

  • Make the database choice a drop-down list that’s only populated & enabled when a new data context class is being created. If an existing context class is selected, disable the drop-down list and make the selected item text like “Configured by DbContext”
  • OpenAPI does not have a space in it
  • Add tooltips to all labels/controls that describes in more detail what they do
  • Default the “Use TypedResults” and “Enable OpenAPI” checkboxes to checked/true
0reactions
deepchoudherycommented, Dec 9, 2022

All these have been addressed I believe, for anything else let’s use new(er) issues. Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Content for Minimal APIs scaffolding with .NET 7 features
The team will be rolling out a number of features for .NET 7, some of which we want to include in our scaffolding...
Read more >
Scaffold Identity in ASP.NET Core projects
You might want to generate source code so you can modify the code and change the behavior. For example, you could instruct the...
Read more >
What's New in .NET 7 for Minimal APIs?
What New Features Did .NET 7 Bring to Minimal APIs? · 1. Endpoint Filters · 2. Typed Results · 3. Route Groups.
Read more >
Scaffolding Minimal Api with a separate DbContext project ...
I have a solution name BugDemo consisting of 2 projects. Here is the github repo. a class library named Data . an Asp.Net...
Read more >
7 Awesome New Features in .NET 7 - YouTube
NET Core 06:20 - Minimal API Grouping 09:10 - C# 11 and F# 7 (required, raw string literals, and more) 13:05 - Container...
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