@@ -57,6 +57,35 @@ To help with the migration, here are the currently known issues with 3.X. This l
- l10n (translations) is not implemented.
- Relative path support for external files is not implemented.
### SwaggerUIBundle
To use swagger-ui you should take a look at the [source of swagger-ui html page](https://github.com/swagger-api/swagger-ui/blob/master/dist/index.html) and customize it. This basically requires you to instantiate a SwaggerUi object and call load() on it as below:
```javascript
constui=SwaggerUIBundle({
url:"http://petstore.swagger.io/v2/swagger.json",
dom_id:'#swagger-ui',
presets:[
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
plugins:[
SwaggerUIBundle.plugins.DownloadUrl
],
layout:"StandaloneLayout"
})
```
#### Parameters
Parameter Name | Description
--- | ---
url | The url pointing to API definition (normally `swagger.json` or `swagger.yaml`).
spec | A JSON object describing the OpenAPI Specification. When used, the `url` parameter will not be parsed. This is useful for testing manually-generated specifications without hosting them.
validatorUrl | By default, Swagger-UI attempts to validate specs against swagger.io's online validator. You can use this parameter to set a different validator URL, for example for locally deployed validators ([Validator Badge](https://github.com/swagger-api/validator-badge)). Setting it to `null` will disable validation.
dom_id | The id of a dom element inside which SwaggerUi will put the user interface for swagger.