Search code examples
attributesblueprintapiblueprintapiary

Why do attributes in Apiary always show in the documentation as required even though set to optional?


I have created an object in the Data Structures section as such:

## User Base (object)
+ first_name: John (optional, string)
+ last_name: Doe (optional, string)
+ birthday: `1980-12-20` (optional, string)
+ email: john.doe@foo.com (optional, string)
+ password: secret (optional, string)

Then in its appropriate resource I use the object in my request action:

### Create a new user [POST]

+ Request (application/json)
    + Attributes (User Create)

+ Response 201

In my documentation it still always shows up like the image below showing it is required (descriptions are not shown there either). However in generated JSON schema everything is as it should.

Is this a bug, a feature not fully supported yet or am I doing something wrong in my markup?

Documentation! Y U no show my settings?


Solution

  • This is known bug (https://github.com/apiaryio/api-blueprint/issues/218) and we are working on it.

    Thanks.