dingo / api

A RESTful API package for the Laravel and Lumen frameworks.
BSD 3-Clause "New" or "Revised" License
9.33k stars 1.25k forks source link


No value(s) specified #1665

Closed grozwalker closed 5 years ago

grozwalker commented 5 years ago
Q A
Bug? yes
New Feature? no
Framework Laravel
Framework version 5.8.23
Package version 2.2.3
PHP version 7.3

Actual Behaviour

When create documentation url with params package create md looks like:

+ Parameters
    + offset: (integer, optional) - The offset of results to start view.
        + Default: 0

But when it paste to apiary.io it validation thow error:

no value(s) specified

Expected Behaviour

Apiary validator expected parametr without colon:

+ Parameters
    + offset (integer, optional) - The offset of results to start view.
        + Default: 0

Possible Solutions

Maybe we can config outputs?

specialtactics commented 5 years ago

Hi

How sure of this are you?

https://github.com/apiaryio/api-blueprint/blob/master/API%20Blueprint%20Specification.md#def-uriparameters-section

The reason it says no value specified is because you are not giving an example value inside backticks. In your example, you need to do the following:

+ Parameters
    + offset: `100` (integer, optional) - The offset of results to start view.
        + Default: 0
grozwalker commented 5 years ago

But if you do not want to specify an example, the syntax is different

specialtactics commented 5 years ago

Ah nevermind, I read further into it, and I now realise your use case. I will merge the PR.