Search code examples
htmlapiapiblueprintapiary.ioaglio

Rendering attributes on aglio?


I'm new to aglio I was trying to render attributes for my documentation, but it does not work.

## Modify User [/users/{id}.json?{token}=API_TOKEN]
Modify any accessible fields if authorized

### Modify User [PUT]
+ Parameters
    + id: 1 (required, String) - User ID
    + token: (String) - API Token provided by the application
+ Attributes (object)
    + email : Format: [email protected] (string) - Email UNIQUE
    + password : (string) - Password
    + firstname : (string) - Firstname
    + lastname : 1 (string) - Lastname

When trying to render this function with `aglio -i input.apib --theme-template triple -o output.html, I don't see the attributes. Why? I want it to look like this

I want it to look like this where you can see the parameters and the attributes

I found this image in a GitHub issue thread

Thanks for helping.


Solution

  • Jonathan, attributes rendering is currently not supported in Aglio. Rendering them is not trivial and Apiary has spent a lot of time and effort to get it working, which I haven't had the time to do in Aglio yet.

    Additionally I would like to support attributes rendering for Swagger and other inputs. I have a partial implementation of a general-purpose JSON schema renderer that takes both API Blueprint and Swagger (Open API) as input, but I have no idea when I'll have the time to finish it, polish it up and make a release.