You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i have declared this single mapping: app.MapPost("/User/Update/{userId:int}", (int userId) => Results.Ok());
now in document filter class:
class Filter : IDocumentFilter {
public void Apply(OpenApiDocument swaggerDoc, DocumentFilterContext context) {
var description in context.ApiDescriptions.First();
var path = description.RelativePath;
var key = swaggerDoc.Paths.Keys.First();
}
}
path variable will be resolved as /User/Update/{userId:int}
key variable as /User/Update/{userId}
so i cannot simply compare these two and need to do regex magic to get rid of :int part from path ...
The text was updated successfully, but these errors were encountered:
i have declared this single mapping:
app.MapPost("/User/Update/{userId:int}", (int userId) => Results.Ok());
now in document filter class:
path
variable will be resolved as/User/Update/{userId:int}
key
variable as/User/Update/{userId}
so i cannot simply compare these two and need to do regex magic to get rid of
:int
part frompath
...The text was updated successfully, but these errors were encountered: