Skip to content

How to define default value for example request? And: Some other errors #191

@prodigy7

Description

@prodigy7

I had a method which need a required GET parameter "language". I have defined in app/Http/Requests a rule with "required|in:....". The documentation generator does create a example request but wrong:

curl -X GET "http://127.0.0.1/public/api/v1/country" -H "Accept: application/json" -d "language"="hrv" \

  1. The backslash at end is too much.
  2. There is a -G (required for GET call) parameter missing between GET and "http...". So under example response only the error is shown when the GET parameter is missing. The right command must be
    curl -X GET "http://127.0.0.1/public/api/v1/country" -H "Accept: application/json" -d "language"="hrv"
  3. The javascript sample has the same error: Error is shown and not the correct return. I had currently invest no furhter time, investigate which parameter is missing so the ajax call is send as a correct GET request
  4. Where the generator takes the "hrv" default parameter? I have any chance, set my own value for example? "hrv" is a possible value in the List, but I want another value.
  5. In the documentation under HTTP Request the are 2 calls: First is GET [url], second HEAD [url]. Second is wrong, I had defined only a GET route for [url] in the api routes

Another error: I set APP_URL and APP_DOCS_URL but both values are not taken for the postmal collection url in the documentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions