dotnet add package Microsoft.AspNetCore.OpenApi
< /code>
Das [url=viewtopic.php?t=20324]Problem[/url] kommt, wenn ich versuche, es zu verwenden: < /p>
using Microsoft.AspNetCore.OpenApi; /* Error here: The type or namespace name 'OpenApi' does not exist in the namespace 'Microsoft.AspNetCore'*/
var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();
builder.Services.AddOpenApi(); /* Error here: 'IServiceCollection' does not contain a definition for 'AddOpenApi' and no accessible extension method 'AddOpenApi' accepting a first argument of type 'IServiceCollection' could be found */
app.MapGet("/", () => "Hello World!");
if (app.Environment.IsDevelopment())
{
app.MapOpenApi(); /*Error here: 'WebApplication' does not contain a definition for 'MapOpenApi' and no accessible extension method 'MapOpenApi' accepting a first argument of type 'WebApplication' could be found*/
}
app.Run();
Ich bin mir also nicht sicher, was ich fehlt. Ich verwende die .NET9-Version und meine CSproj -Datei sieht so aus:
Ich versuche, das OpenAPI -Paket in meinem minimalen API -Projekt nach diesem Tutorial aus der Microsoft -Dokumentation zu verwenden.[code]dotnet add package Microsoft.AspNetCore.OpenApi < /code> Das [url=viewtopic.php?t=20324]Problem[/url] kommt, wenn ich versuche, es zu verwenden: < /p> using Microsoft.AspNetCore.OpenApi; /* Error here: The type or namespace name 'OpenApi' does not exist in the namespace 'Microsoft.AspNetCore'*/
var builder = WebApplication.CreateBuilder(args); var app = builder.Build();
builder.Services.AddOpenApi(); /* Error here: 'IServiceCollection' does not contain a definition for 'AddOpenApi' and no accessible extension method 'AddOpenApi' accepting a first argument of type 'IServiceCollection' could be found */
app.MapGet("/", () => "Hello World!");
if (app.Environment.IsDevelopment()) { app.MapOpenApi(); /*Error here: 'WebApplication' does not contain a definition for 'MapOpenApi' and no accessible extension method 'MapOpenApi' accepting a first argument of type 'WebApplication' could be found*/ }
app.Run();
[/code] Ich bin mir also nicht sicher, was ich fehlt. Ich verwende die .NET9-Version und meine CSproj -Datei sieht so aus: [code]
Swagger OpenAPI 3.0 arbeitet mit Springdoc-OpenAPI-UI und einer benutzerdefinierten OpenAPI-Bean.
org.springframework.cloud
spring-cloud-starter-parent
Hoxton.SR10
Ich möchte in regulären Ausdrücken alle Zahlen in Zeichen umwandeln, weiß aber nicht, welche Zahlen in welche Zeichen umgewandelt werden können.
Zum Beispiel möchte ich alle folgenden Zahlen mit...
Ich versuche, CVE-2024-30251 zu reproduzieren, eine Verleugnung des Service-Anfälligkeit in AIOHTTP (Python Async Web Framework), das die Versionen vor 3.9.4 betrifft. Nach den Ratschlägen wird diese...
Wie sieht eine minimale Implementierung einer Sequenz aus Collection.abc zusammen mit den korrekten Typen aus wie
gemäß der Dokumentation __len __ und __getItem __ sind ausreichend. Mein...