Open elincognito opened 10 years ago
Interesting thought however the grammar should probably enforce that since, the only reason url slugs are required is because it would not be possible to represent a url by definition, whereas query params and headers are more like a collection of options.
I am not sure what the grammar would look like that would make headers or params required also I think this could be enforced at a higher level.
I am not against this idea, just that I have no desire to do it since I have never needed it however I am happy to accept pull requests if the design is thought out such as, what the grammar would look like, etc :)
It should be possible to define the headers and the params as "required" in the same way that we define the url
example
It should generate code the enforces the passing of the header "Authorization" as a parameter to the method login, the same applies to params