danielgtaylor / aglio

An API Blueprint renderer with theme support that outputs static HTML
4.75k stars 480 forks source link

trailing curly-brace param disappears in markup #232

Open nguyen-brian opened 8 years ago

nguyen-brian commented 8 years ago

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 commented 8 years ago

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."

cjwilburn commented 8 years ago

I'm also seeing this on version 2.1.1

Astrac commented 8 years ago

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.

jackbentley commented 7 years ago

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