Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarity and tests needed about passing parameters in url's #1022

Open
dave42w opened this issue Nov 10, 2024 · 1 comment
Open

Clarity and tests needed about passing parameters in url's #1022

dave42w opened this issue Nov 10, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@dave42w
Copy link
Contributor

dave42w commented Nov 10, 2024

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.

@dave42w dave42w added the enhancement New feature or request label Nov 10, 2024
@sansyrox
Copy link
Member

Hey @dave42w 👋

I agree. I will spend some time over the weekend to add some tests and docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants