Open futugyou opened 2 months ago
Hi, thanks for the report ! What version of apistos / schemars do you use ? This is most likely an issue on schemars side and not directly related to apistos. Just in case, please make sure your serde version match the one provided by schemars, it could explain the issue.
schemars = { package = "apistos-schemars", version = "0.8", features = [
"chrono",
"uuid1",
"url",
"rust_decimal",
] }
apistos = { version = "0.3", features = [
"extras",
"qs_query",
"rapidoc",
"redoc",
"swagger-ui",
] }
I also tried the default features, same error.
schemars = { package = "apistos-schemars", version = "0.8" }
apistos = { version = "0.3" }
And i found another question, this is metrics endpoint.
#[get("/metrics")]
#[api_operation(summary = "health check")]
pub(crate) async fn metrics(metrics_handle: ThinData<PrometheusHandle>) -> impl Responder {
metrics_handle.render()
}
ThinData in actix-web 4.9 PrometheusHandle in metrics-exporter-prometheus 0.15.3
this code show an error
no function or associated item named `required` found for struct `ThinData<PrometheusHandle>` in the current scope
function or associated item not found in `ThinData<PrometheusHandle>`
Hi, I still can't figure out the issue.
About this snippet: `#[get("/metrics")]
pub(crate) async fn metrics(metrics_handle: ThinData
ApiComponent
for ThinData
nor PrometheusHandle
. It could be done and hidden behind a feature#[get(...)]
for example) are currently not supported by Apistos. This would generate an incorrect definition with no path.
I have a struct like this, and it was working normally.
but when add 'JsonSchema' like this
it show an error,
what can i do with this error