opened 03:00PM - 17 Jun 24 UTC
closed 07:16AM - 24 Jul 24 UTC
feature
codekitchen-soos
Hi, is there anyway to specify custom fields (starting with x-) for a given rout…e with a metadata parameter in the doc decorator?
```python
@app.route("/compute-intermodal-routes-co2eq", methods=["GET"])
@app.doc(
summary="Compute intermodal routes CO2eq emissions",
description="This intermodal routing API endpoint ",
security=[{"api_key": []}],
metadata={"x-conf": {"lambda": {"memory_size": 1000, "concurrent_execution": -1}}},
)
```
For now I am using spec_processor
```python
@app.spec_processor
def get_spec(spec):
spec["paths"]["/compute-intermodal-routes-co2eq"]["get"]["x-conf"] = {
"lambda": {"memory_size": 200, "concurrent_execution": -1},
"throttling": {"rateLimit": 10, "burstLimit": 1},
}
```