Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An explode ("*") modifier isn't recognized in the URI Template #500

Closed
honzajavorek opened this issue Aug 21, 2017 · 2 comments
Closed

An explode ("*") modifier isn't recognized in the URI Template #500

honzajavorek opened this issue Aug 21, 2017 · 2 comments

Comments

@honzajavorek
Copy link
Contributor

Drafter now seems to support arrays in URI parameters, but it fails to recognize the explode ("*") modifier and returns a warning. Example API Blueprint:

FORMAT: 1A

# Beehive API

## Honey [/honey{?beekeeper,flavour*}]

+ Parameters
    + beekeeper: Honza (enum[string], optional)

        Description...

        + Members
            + Adam
            + Honza
            + Dredd
        + Default: Dredd

    + flavour: sweet (array[string])
        + Members
            + sweet
            + spicy

### Remove [DELETE]

+ Request (application/json)

+ Response 200

The warning:

parameter 'flavour' is not found within the URI template '/honey{?beekeeper,flavour*}' for 'Honey'
@honzajavorek
Copy link
Contributor Author

honzajavorek commented Aug 22, 2017

First, I learned API Blueprint doesn't support arrays as URI Parameters (yet), so this issue should be formulated as a feature request, not as a bug report. Second, there are some problems with semantics of the URI Template, see apiaryio/dredd#791. I'm closing this, because the issue as it is now is IMHO just confusing.

honzajavorek added a commit to apiaryio/dredd-transactions that referenced this issue Aug 22, 2017
URI parameters in form of arrays are not officially supported in the
API Blueprint parser yet. Even when using Swagger, I found problems
with the current implementation, which prevent Dredd from correctly
expanding the URI Templates. The feature is completely untested on
Dredd side. For that reason, I re-opened the relevant issue on
GitHub and hereby I'm demoting array URI parameters to an experimental
feature, which is not officially fully supported yet.

apiaryio/dredd#791
apiaryio/drafter#500
grncdr/uri-template#17
@kylef
Copy link
Member

kylef commented Aug 22, 2017

Linking in apiaryio/snowcrash#357 regarding * operator. Regarding array support, I think that would be tracked via full MSON support in Parameters (apiaryio/api-blueprint-rfcs#3).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants