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

pass dynamic parameters are not working #428

Closed
diegoug opened this issue May 11, 2018 · 3 comments
Closed

pass dynamic parameters are not working #428

diegoug opened this issue May 11, 2018 · 3 comments

Comments

@diegoug
Copy link

diegoug commented May 11, 2018

FORMAT: 1A
HOST: http://polls.apiblueprint.org/

# test

Polls is a simple API allowing consumers to view polls and vote in them.

## The translation API [/i18n/{id}]

+ Parameters

    + id (optional, number)

### Retrieves a translation [GET]

+ Request Volkswagen
    + Parameters

        + id: 1

+ Response 200 (application/json)

        { 
            "message": "Volkswagen" 
        }

+ Request Ford
    + Parameters

        + id: 2

+ Response 200 (application/json)

        { 
            "message": "ford" 
        }

I am trying to run this example and I pass the parameters in a dynamic way but it always responds the same to me, the first answer, I do not know what is happening, I tried everything but nothing works

https://private-cf6fe6-testing01.apiary-mock.com/i18n/1
https://private-cf6fe6-testing01.apiary-mock.com/i18n/2

response:

{ 
    "message": "Volkswagen" 
}

https://app.apiary.io/testing01

@Ritural
Copy link

Ritural commented Sep 6, 2018

Hey @diegoug,

I don't think that multiple responses based on dynamic parameters has been implemented yet.

Checkout these similar issues

I managed to get around it but it was by explicitly writing the url for my 2nd response.

So this could work for you

FORMAT: 1A
HOST: http://polls.apiblueprint.org/

# test

Polls is a simple API allowing consumers to view polls and vote in them.

## The translation API [/i18n/{id}]

+ Parameters

    + id (optional, number)

### Retrieves a translation [GET /i18n/{id}]

+ Request Volkswagen
    + Parameters

        + id: 1

+ Response 200 (application/json)

        { 
            "message": "Volkswagen" 
        }
        
### Retrieves a translation 2nd example [GET /i18n/2]

+ Request Ford
    + Parameters

        + id: 2

+ Response 200 (application/json)

        { 
            "message": "ford" 
        }

@kylef
Copy link
Member

kylef commented Jan 10, 2019

These are implement in the parser, please seek feature requests with any tooling that doesn't properly support it. We're tracking this in the issue at #58 (comment).

@kylef kylef closed this as completed Jan 10, 2019
@anentropic
Copy link

This is still not supported (rendered) in Apiary

I'm not sure where to report such an issue though

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

4 participants