I'm trying to create a simple flat contract of my own and a generator for it 
and I really don't know where to start. The docs here: 
https://docs.racket-lang.org/reference/Random_generation.html aren't very 
useful for somebody that doesn't know at a high level what to do.

Also, on this page: 
https://docs.racket-lang.org/reference/data-structure-contracts.html, it says

> The generator argument adds a generator for the flat-named-contract. See 
> contract-generate for more information.

I can't find contract-generate anywhere in the docs or via Google.

Here's what I'm trying to do:

I have a REST API at work written in another language and I'd like to be able 
to hit it with requests with lots of different combinations of parameters. My 
second goal is to be able to verify that the data coming back in json conforms 
to some schema. Essentially, if the value at a certain key is of a certain 
type. I did some research and thought that contracts were perfect for me. Am I 
correct about this?

I started by trying to create a flat-named-contract that checks if the first 
char of a string is a '/', like for a relative url or file path. I can define 
the contract, but the generation aspect has been a wall for me.

Could somebody give me an example?

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to