Hi! I've an issue with the Authentication header. The documentation says:
If Authentication header is already present in the description, Security Definitions won't be inserted
and rendered at all.
Here is an example:
Click
swagger: '2.0'
info:
description: |
# General description
goes here
# Authentication
If `Authentication header` is already present in the description, Security Definitions won't be inserted and rendered at all.
version: v1.2.3-beta
title: Title
host: example.com
basePath: /v1/path
tags:
- name: Tag1
description: 'Tags'
schemes:
- https
consumes:
- application/json
produces:
- application/json
paths:
/:
get:
tags:
- Tags
summary: Summary
description: 'Description'
parameters:
- name: param1
in: query
description: Text
type: integer
security:
- API key: []
deprecated: false
securityDefinitions:
API key:
type: apiKey
name: x-api-key
in: header
That renders as:

Am I doing something wrong here? Thanks in advance
Remove an extra-space before # Authentication header.
description: |
# General description
goes here
# Authentication
If `Authentication header` is already present in the description, Security Definitions won't be inserted and rendered at all.
version: v1.2.3-beta
title: Title
The issue still reproduces.
That:
swagger: '2.0'
info:
description: |
# General description
goes here
# Authentication
If `Authentication header` is already present in the description, Security Definitions won't be inserted and rendered at all.
version: v1.2.3-beta
title: Title
host: example.com
basePath: /v1/path
tags:
- name: Tag1
description: 'Tags'
schemes:
- https
consumes:
- application/json
produces:
- application/json
paths:
/:
get:
tags:
- Tags
summary: Summary
description: 'Description'
parameters:
- name: param1
in: query
description: Text
type: integer
security:
- API key: []
deprecated: false
securityDefinitions:
API key:
type: apiKey
name: x-api-key
in: header
still renders with the security definitions:

I will check it out. Thanks
Running into the same issue. Any luck finding the problem @RomanHotsiy ?
Is the issue only with OAS2?
Most helpful comment
I will check it out. Thanks