Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding defaultModelRendering support #134

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ npm install hapi-swaggered-ui@next
* `operationsSorter`: Apply a sort to the operation list of each API. It can be 'alpha' (sort by paths alphanumerically), 'method' (sort by HTTP method), null (server side sorting) or a custom function (see link above).
* `docExpansion`: Controls how the API listing is displayed. It can be set to 'none' (default), 'list' (shows operations for each resource), or 'full' (fully expanded: shows operations and their details).
* `validatorUrl`: By default, Swagger-UI attempts to validate specs against swagger.io's online validator (disabled for localhost). You can use this parameter to set a different validator URL, for example for locally deployed validators (Validator Badge). Setting it to false will disable validation. This parameter is relevant for Swagger 2.0 specs only.
* In addition the following options are supported: `oauth2RedirectUrl`, `configUrl`, `displayOperationId`, `displayRequestDuration`, `filter`, `deepLinking`, `maxDisplayedTags`, `tagsSorter`, `parameterMacro`, `modelPropertyMacro` - have a look at [swagger-ui](https://github.com/swagger-api/swagger-ui#parameters)
* In addition the following options are supported: `oauth2RedirectUrl`, `configUrl`, `displayOperationId`,, `defaultModelRendering`, `displayRequestDuration`, `filter`, `deepLinking`, `maxDisplayedTags`, `tagsSorter`, `parameterMacro`, `modelPropertyMacro` - have a look at [swagger-ui](https://github.com/swagger-api/swagger-ui#parameters)
* `authorization`: object - can be null or false to disable authorization through swagger-ui (e.g. in case of public apis without auth)
* `scope`: string, 'query' or 'header'
* `field`: string, name of the field
Expand Down
1 change: 1 addition & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const optionsSchema = Joi.object({
oauth2RedirectUrl: Joi.string().optional(),
configUrl: Joi.string().optional(),
displayOperationId: Joi.boolean().optional(),
defaultModelRendering: Joi.string().optional().valid(['model', 'example']),
displayRequestDuration: Joi.boolean().optional(),
filter: Joi.string().allow(null, true, false).optional(),
deepLinking: Joi.boolean().optional(),
Expand Down