Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve readme.md #36

Merged
merged 1 commit into from
Sep 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 34 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,31 @@

## Contents

- [Summary](#summary)
- [Status](#status)
- [Installation](#installation)
- [Usage](#usage)
- [Building an AsyncAPI Document](#building-an-asyncapi-document)
- [Writing an AsyncAPI Document](#writing-an-asyncapi-document)
- [Reading an AsyncAPI Document](#reading-an-asyncapi-document)
- [Generating code-first AsyncAPI documents](#generating-code-first-asyncapi-documents)
- [Using the AsyncAPI UI](#using-the-asyncapi-ui)
- [Using the AsyncAPI client](#using-the-asyncapi-client)
- [Samples](#samples)
- [Streetlights API - Server](#streetlights-api---server)
- [Neuroglia AsyncAPI](#neuroglia-asyncapi)
- [Contents](#contents)
- [Summary](#summary)
- [Status](#status)
- [Installation](#installation)
- [Core library](#core-library)
- [Fluent validation library](#fluent-validation-library)
- [Fluent builders library](#fluent-builders-library)
- [Input/Output library](#inputoutput-library)
- [Code-first generation library](#code-first-generation-library)
- [Dependency inject extensions library](#dependency-inject-extensions-library)
- [Cloud event extensions library](#cloud-event-extensions-library)
- [AsyncAPI document serving library](#asyncapi-document-serving-library)
- [AsyncAPI UI](#asyncapi-ui)
- [Usage](#usage)
- [Building an AsyncAPI Document](#building-an-asyncapi-document)
- [Writing an AsyncAPI Document](#writing-an-asyncapi-document)
- [Reading an AsyncAPI document](#reading-an-asyncapi-document)
- [Generating code-first AsyncAPI documents](#generating-code-first-asyncapi-documents)
- [1. Mark your services with adequate attributes](#1-mark-your-services-with-adequate-attributes)
- [2.1. Generating documents manually](#21-generating-documents-manually)
- [2.2. Generating documents automatically and serve them using ASP](#22-generating-documents-automatically-and-serve-them-using-asp)
- [Using the AsyncAPI UI](#using-the-asyncapi-ui)
- [Samples](#samples)
- [Streetlights API - Server](#streetlights-api---server)

## Summary
A .NET used to visualize and interact with [AsyncAPI](https://www.asyncapi.com/docs/reference/specification/v2.6.0) documents. The UI is built using Razor Pages and Boostrap
Expand Down Expand Up @@ -239,7 +252,7 @@ public class Startup
{
...
//Adds the middleware used to serve AsyncAPI documents
app.UseAsyncApiGeneration();
app..MapAsyncApiDocuments();
...
}

Expand All @@ -255,6 +268,14 @@ Go to your ASP project's `Startup.cs` file and add the following line to your `C
services.AddAsyncApiUI();
```

**Note**: Since RazorPages are used, make sure you add it to the service collection: `services.AddRazorPages();` and use the middleware to serve the pages: `app.MapRazorPages();`.
You will also need to register an `IJsonSchemaResolver` and a `HttpClient`:
```csharp
services.AddSingleton<IJsonSchemaResolver, JsonSchemaResolver>();
services.AddHttpClient();
```
For reference take a look at the [sample](#streetlights-api---server)

Launch your ASP project, then navigate to `http://localhost:44236/asyncapi`. You should see something like this:

![AsyncAPI UI - Screenshot](/assets/img/ui.png)
Expand Down
Loading