rswag
rswag copied to clipboard
Adding operation tags to global tags
Using rswag to create OAS 3 specs.
When checking the result with spectral lint i get tons of warnings:
operation-tag-defined Operation tags must be defined in global tags
So as i understand the remedy would be to have a tags array in the root of the spec with the combination all tags used below paths.
Anyone got an idea how i could tap into this after running the rake task?
I was searching for this.
I realized that the global tags can be added to the spec/swagger_helper.rb file.
Here is an example:
Rspec.configure do |config|
config.openapi_specs = {
"swagger.yaml": {
tags: [
{name: "My Global Tag"}
]
}
}
end