Robyn
Robyn copied to clipboard
Clarity and tests needed about passing parameters in url's
We only have a basic example of url's with parameters in the docs. See https://robyn.tech/documentation/example_app/modeling_routes where we have:
@app.put("/crimes/:crime_id")
We should decide what is allowed, document it and add tests to ensure that only valid ways are acceptable. For example, at present it is unclear which of these are valid for Robyn:
@app.put("/crimes/:crime_id/:type")
@app.put("/crimes/:crime_id:type")
@app.put("/crimes:crime_id:type")
@app.put("/crimes/:crime_id/:type/fred")
@app.put("/:crime_id/:type?q=:page")
@app.put("/:crime_id/crime")
@app.put("/:crime_id/:type?q=:page&t=:totalpages")
@app.put("/:crime_id/:type?q=:page.:totalpages")
I'm not sure we need to reject any of these but at least we should document and test.
Hey @dave42w 👋
I agree. I will spend some time over the weekend to add some tests and docs