Describe additionalProperties in comments

This commit is contained in:
David Robertson 2022-11-22 18:12:26 +00:00
parent dc8b133f2e
commit 6487e84c4e
No known key found for this signature in database
GPG key ID: 903ECE108A39DEDD
2 changed files with 10 additions and 0 deletions

View file

@ -15,6 +15,7 @@
* required * required
* enum * enum
* anchor: a string suitable for using as an html anchor for this object (if `anchor_base` was set, and the object has a title) * anchor: a string suitable for using as an html anchor for this object (if `anchor_base` was set, and the object has a title)
* additionalProperties: either nil, a boolean, or an OpenAPI schema object (https://swagger.io/specification/#schema-object).
Note that the returned array may contain duplicate objects. Note that the returned array may contain duplicate objects.

View file

@ -13,6 +13,15 @@
In some cases (such as response body specifications) this isn't used, and In some cases (such as response body specifications) this isn't used, and
instead properties have a `required` boolean attribute. We support this too. instead properties have a `required` boolean attribute. We support this too.
* `additionalProperties`: one of
- `false` (no additional properties are permitted);
- `true` (additional properties pairs are permitted, with no constraints);
- an OpenAPI schema object [1] (additional properties are permitted, but
with constraints on `property_data`); or
- `nil` (not specified in schema, use `true` as a default value).
[1]: https://swagger.io/specification/#schema-object
*/}} */}}
{{ $title := .title }} {{ $title := .title }}