If I generate static HTML from the "basic-auth.yaml" example with:
java -jar ./swagger-codegen/modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate -i basic-auth.yaml -o ~/docs
The generated HTML will have a "Access" heading but no security definitions will be listed under it and no security requirement will be listed under the path item either.
basic-auth.yaml:
---
swagger: '2.0'
info:
version: "1.0.0"
title: Basic Auth Example
description: |
An example for how to use Basic Auth with Swagger.
Server code is available [here](https://github.com/mohsen1/basic-auth-server). It's running on Heroku.
**User Name and Password**
* User Name: `user`
* Password: `pass`
host: basic-auth-server.herokuapp.com
schemes:
- http
- https
securityDefinitions:
basicAuth:
type: basic
description: HTTP Basic Authentication. Works over `HTTP` and `HTTPS`
paths:
/:
get:
security:
- basicAuth: []
responses:
200:
description: Will send `Authenticated` if authentication is succesful, otherwise it will send `Unauthorized`
If I generate static HTML from the "basic-auth.yaml" example with:
java -jar ./swagger-codegen/modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate -i basic-auth.yaml -o ~/docsThe generated HTML will have a "Access" heading but no security definitions will be listed under it and no security requirement will be listed under the path item either.
basic-auth.yaml: