Untitled
unknown
plain_text
a year ago
971 B
4
Indexable
using System; using System.Collections.Generic; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.DependencyInjection; using Microsoft.OpenApi.Models; var builder = WebApplication.CreateBuilder(args); // Add services before building the application builder.Services.AddEndpointsApiExplorer(); builder.Services.AddSwaggerGen(c => { c.SwaggerDoc("v1", new() { Title = "DocumentService", Version = "v1" }); }); var app = builder.Build(); app.MapPost("/get_document_image", (int userId, long documentId) => { // Your logic here return Results.Ok(); }); app.MapGet("/get_documents_with_attributes", (int userId, int centralArchiveID, int classId, List<Tuple<int, string>> attributeValues) => { // Your logic here return Results.Ok(); }); app.UseSwagger(); app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/v1/swagger.json", "DocumentService v1"); }); app.Run();
Editor is loading...
Leave a Comment