asyncapi / saunter

Saunter is a code-first AsyncAPI documentation generator for dotnet.
https://www.asyncapi.com/
MIT License
194 stars 55 forks source link

[FEATURE] Support AOT Trimmed applications #187

Open yurvon-screamo opened 4 months ago

yurvon-screamo commented 4 months ago

Why do we need this improvement?

Currently, it is not possible to use the library for applications built in aot or with trim enabled.

How will this change help?

Add support for such applications (perhaps not in the full functional scope of the library)

Screenshots

No response

How could it be implemented/designed?

Generate a yml file (or its template) when building the application. At the start of the application, it is slightly mutated according to the environment.

The main thing is to avoid using reflection in runtime.

🚧 Breaking changes

Yes

👀 Have you checked for similar open issues?

🏢 Have you read the Contributing Guidelines?

Are you willing to work on this issue?

Yes I am willing to submit a PR!

yurvon-screamo commented 3 months ago

When trying to implement, it turned out that NewtonsoftAsyncApiDocumentSerializer is not able to deserialize))

Therefore, we will have to start with migrating to the lego library

VisualBean commented 3 months ago

I will start this task very soon, just have a few loose ends to fix up

yurvon-screamo commented 3 months ago

I will start this task very soon, just have a few loose ends to fix up

I thought I'd start today)

Then you'd better do it, because I'm not familiar with the lego library at all.