Skip to content
#

parameters

Here are 254 public repositories matching this topic...

mhbdev
mhbdev commented Apr 8, 2021

I have defined this route using Fluro. exchange/:pair

There is a problem! I want :pair to be optional. If client types https://host:port/exchange/BNB_BTC everything goes fine. but assume the user is looking for https://host:port/exchange and he confronts with 404 error cause there is no such route/path.

I mean something like exchange/{:pair}.

Schemas come to solve a simple problem. Sometimes we would like to have type-safe guarantee params when parsing HTTP parameters or Hash(String, String) for a request moreover; Schemas is to resolve precisely this problem with the added benefit of performing business rules validation to have the params adhere to a "business schema."

  • Updated Apr 26, 2021
  • Crystal

Improve this page

Add a description, image, and links to the parameters topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the parameters topic, visit your repo's landing page and select "manage topics."

Learn more