You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Open API supports the keyword 'security' at the root level. Currently there is no commonProperties for 'security' so it gets added to the default 'paths'.
See: https://swagger.io/docs/specification/authentication/ Step 2: Applying security
To Reproduce
Steps to reproduce the behavior:
Create an OpenAPI 3.0 yaml spec with security defined and applied at the root level.
Generate a swagger json file.
The 'security' object gets put into the 'paths' object in the resulting json.
Expected behavior
The 'security' object if at the root level in the yaml should also be at the root level in the resulting json.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
edit:
I discovered a workaround. It works if you use it in the Options object. Given this is an app level config, this is an acceptable place to place this configuration.
Activity
stale commentedon Sep 18, 2022
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
ZebboKlaufix commentedon May 1, 2023
It seems that this error still occures. Is there any chance to bypass the issue?
duluca commentedon Sep 2, 2023
Bump.
edit:
I discovered a workaround. It works if you use it in the Options object. Given this is an app level config, this is an acceptable place to place this configuration.
Example below:
In contrast, this doesn't work: