aglio icon indicating copy to clipboard operation
aglio copied to clipboard

trailing curly-brace param disappears in markup

Open nguyen-brian opened this issue 10 years ago • 4 comments

I have a section in my code that looks like this:

## Dog [/api/dogs/{dog_id}]

### Show dog [GET]

I was running a previous version of aglio (2.0.0-beta2), and it rendered fine.

screen shot 2016-02-04 at 6 19 39 pm

Upgrading to 2.0.2 makes the {dog_id} disappear.

screen shot 2016-02-04 at 6 19 40 pm

Am I doing something wrong here?

nguyen-brian avatar Feb 05 '16 02:02 nguyen-brian

Ok, I figured out a workaround to get the dog_id to show up again. I had to add the parameter into the Parameters section, like this:

## Dog [/api/dogs/{dog_id}]
+ Parameters
    + dog_id

### Show dog [GET]

Despite now having a workaround, I still would consider this a bug since according to the API blueprint specification for this section: "NOTE: This section should only contain parameters that are specified in the parent's resource URI template, and does not have to list every URI parameter."

nguyen-brian avatar Feb 05 '16 18:02 nguyen-brian

I'm also seeing this on version 2.1.1

cjwilburn avatar Feb 19 '16 19:02 cjwilburn

Same problem on version 2.2.0 and not just for the trailing parameters but also for the middle ones.

In the following:

### Article updates [/articles/{articleId}/updates/{updateNumber}]

This resource is used to perform updates on an article resource.

+ Parameters
  + articleId
  + updateNumber

The output markup will present the URI as /articles/updates.

Astrac avatar Apr 29 '16 14:04 Astrac

You should really be specifying the parameters and their types/samples/etc anyway 😉 Aglio wont be able to generate a good example URL else!

jackbentley avatar Mar 03 '17 23:03 jackbentley