redoc/docs/security-definitions-injection.md

24 lines
644 B
Markdown
Raw Permalink Normal View History

2016-10-31 13:32:17 +03:00
# Injection security definitions
You can inject the Security Definitions widget anywhere in your specification `description`:
2016-10-31 13:32:17 +03:00
```markdown
...
# Authorization
2016-10-31 13:32:17 +03:00
Some description
<!-- Redoc-Inject: <security-definitions> -->
2016-10-31 13:32:17 +03:00
...
```
The inject instruction is wrapped in an HTML comment,
so it is **visible only in Redoc** and not visible, for instance, in the SwaggerUI.
2016-10-31 13:32:17 +03:00
# Default behavior
If the injection tag is not found in the description, it is appended to the end
of description under the `Authentication` header.
If the `Authentication` header is already present in the description,
Security Definitions are not inserted or rendered.