How to configure API introduction?
- How can I specify what it shows for "License" / how can I remove it?

-
How can I add a custom API introduction text here (using markdown)? I tried with a doc comment (using
#[doc = include_str!("API-Intro.md")]) for my mainApiDocstruct that has#[derive(OpenApi)], but the doc comment seems to be ignored by the generator, any idea why? -
How can I specify the html
<title>for the generated doc? :)
You can use custom modifier to this.
struct ApiDocInfo;
impl Modify for ApiDocInfo {
fn modify(&self, openapi: &mut openapi::OpenApi) {
openapi.info.description = Some(include_str!("../README.md").to_string());
}
}
Also with this you can modify all the info related fields as you may wish. E.g. You could also remove the Licence as well.
Thanks, that's very useful :) Btw, is it also possible to specify a favicon or to modify the CSS styling?
Or to add a search field, like in slate docs? E.g.: https://mermade.github.io/reslate https://bestbuyapis.github.io/api-documentation
Btw, is it also possible to specify a favicon or to modify the CSS styling?
If I'm not mistaken it is not possible with the Swagger UI. But for this you should use another OpenAPI doc "browser". For example those OpenAPI's are using https://redocly.com/redoc/. I've had a plan to support this as well as an alternative to the Swagger UI but no concrete action has been taken towards this so far.