diff --git a/README.md b/README.md index e288f569..533d86d6 100644 --- a/README.md +++ b/README.md @@ -94,6 +94,9 @@ For npm: ## Configuration +### Security Definition location +You can inject Security Definitions widget into any place of your specification `description`. Check out details [here](docs/security-definitions-injection.md). + ### Swagger vendor extensions ReDoc makes use of the following [vendor extensions](http://swagger.io/specification/#vendorExtensions): * [`x-logo`](docs/redoc-vendor-extensions.md#x-logo) - is used to specify API logo diff --git a/docs/security-definitions-injection.md b/docs/security-definitions-injection.md new file mode 100644 index 00000000..84071c07 --- /dev/null +++ b/docs/security-definitions-injection.md @@ -0,0 +1,19 @@ +# Injection security definitions + +You can inject Security Definitions widget into any place of your specification `description`: + +```markdown +... +# Authorization +Some description + + +... +``` +Inject instruction is wrapped into HTML comment so it is **visible only in ReDoc**. It won't be visible e.g. in SwaggerUI. + +# Default behavior +If injection tag is not found in the description it will be appended to the end +of description under `Authentication` header. + +If `Authentication` header is already present in the description, Security Definitions won't be inserted and rendered at all.