Skip to content

Commit 2d9d40b

Browse files
author
Richard Lay
committedFeb 20, 2017
Added doco
1 parent 84d2b66 commit 2d9d40b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed
 

‎optionsreference.md

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ JSON (JSON endpoint needed to create UI)
3535
* `produces`: (array) The mimetypes produced - default: `['application/json']`
3636
* `xProperties`: Adds JOI data that cannot be use directly by swagger as metadata - default: `true`,
3737
* `reuseDefinitions`: Reuse of definition models to save space - default: `true`,
38+
* `definitionPrefix`: Dynamic naming convention. `default` or `useLabel` - default: `default`,
3839
* `deReference`: Dereferences JSON output - default: `false`,
3940
* `debug`: Validates the JSON ouput against swagger specification - default: `false`,
4041

‎usageguide.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ validate: {
118118
```
119119
__NOTE: the plugin reuses "definition models" these describe each JSON object use by an API i.e. a "user". This feature
120120
was added to reduce the size of the JSON. The reuse of models can cause names to be reused as well. Please switch
121-
`options.reuseDefinitions` to `false` if you are nameing your JOI objects.__
121+
`options.reuseDefinitions` to `false` if you are naming your JOI objects. By default objects are named in a "Model #"
122+
format. To use the `label`, specify `options.definitionPrefix` as `useLabel`.__
122123

123124

124125

@@ -744,4 +745,4 @@ There are a number of examples of different uses of `hapi-swagger` in the exampl
744745
Both these example use a custom HTML page
745746
* [`be-more-hapi`](https://github.com/glennjones/be-more-hapi) - talk from Async.js on the October 2013 - old `hapi-swagger` example project, but keep update
746747
* [`hapi-token-docs`](https://github.com/glennjones/hapi-token-docs) - A example site using HAPI, JWT tokens and swagger documentation
747-
* [`time-to-be-hapi`](https://github.com/glennjones/time-to-be-hapi) - Londonjs talk March 2016 has many example uses of HAPI and one using `hapi-swagger`
748+
* [`time-to-be-hapi`](https://github.com/glennjones/time-to-be-hapi) - Londonjs talk March 2016 has many example uses of HAPI and one using `hapi-swagger`

0 commit comments

Comments
 (0)
Please sign in to comment.