module OasRails::Extractors::OasRouteExtractor
def extract_security(oas_route:)
def extract_security(oas_route:) return [] if oas_route.docstring.tags(:no_auth).any? if (methods = oas_route.docstring.tags(:auth).first) OasRails.config.security_schemas.keys.map { |key| { key => [] } }.select do |schema| methods.types.include?(schema.keys.first.to_s) end elsif OasRails.config.authenticate_all_routes_by_default OasRails.config.security_schemas.keys.map { |key| { key => [] } } else [] end end