ntex-rs / ntex

framework for composable networking services
Apache License 2.0
2.06k stars 110 forks source link

Add support (or example) auto-generation OpenAPI + SwaggerUI or alternatives #250

Open dayvejones opened 1 year ago

dayvejones commented 1 year ago

Hello!

Almost any API needs good documentation.

Is it possible to add support auto-generation OpenApi documentation + any UI (swagger or redoc)?

If it were possible to generate documentation automatically based on handlers signature analysis, that would be really cool. Killer feature.

I tried the crate Utoipa , but it does not have official support Ntex and is not entirely auto-generated: all the descriptions have to be done manually and as a result, the documentation can easily diverge from reality.

Thanks!

leon3s commented 11 months ago

Hey, i dont think it is in ntex mindset to have these feature out of the box, you should ask the creator of Utoipa if he agree to make a native ntex integration, and/or make a pull request on the utoipa repository, the code would be fairly similar to actix. As for an example I guess you already so this repository

dayvejones commented 11 months ago

Hey, i dont think it is in ntex mindset to have these feature out of the box, you should ask the creator of Utoipa if he agree to make a native ntex integration, and/or make a pull request on the utoipa repository, the code would be fairly similar to actix. As for an example I guess you already so this repository

Hello! I agree that the possibility of auto creating Openapi documentation is not a need for a web framework. But I think that many developers of web services use this feature when working with other technologies. Maybe exist opportunity to add elegantly example with documentation, it will be gorgeous.

I'll see your repository, thanks