Skip to content

x #36883

@alnharya691-ux

Description

@alnharya691-ux

Description

using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.OpenApi;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.OpenApi.Models;
using Scalar.AspNetCore;

var builder = WebApplication.CreateBuilder();

builder.Services.AddOpenApi();

var app = builder.Build();

if (app.Environment.IsDevelopment())
{
app.MapOpenApi();
app.MapScalarApiReference();
}

app.MapGet("/", () => "Hello world!");

app.Run();

Page URL

https://learn.microsoft.com/ar-sa/aspnet/core/fundamentals/openapi/using-openapi-documents?view=aspnetcore-10.0#use-scalar-for-interactive-api-documentation

Content source URL

https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/fundamentals/openapi/using-openapi-documents.md

Document ID

472b10ab-681b-f631-040d-025ef0a02329

Platform Id

c973de58-a013-4aa0-ccef-0bd78e4749db

Article author

x

Metadata

  • ID: 472b10ab-681b-f631-040d-025ef0a02329
  • PlatformId: c973de58-a013-4aa0-ccef-0bd78e4749db
  • Service: aspnet-core
  • Sub-service: fundamentals

Related Issues

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions