Example #1
0
        public void SetApiKeyDetails(SecuritySchemeBuilder sec)
        {
            if (sec == null)
            {
                return;
            }
            var built = sec.Build();

            _templateParams["%(ApiKeyLocation)"] = built.@in;
            _templateParams["%(ApiKeyName)"]     = built.name;

            if (string.IsNullOrWhiteSpace(_templateParams["%(ApiKeyName)"]))
            {
                _templateParams["%(ApiKeyName)"] = "none";
            }
        }
        public void SetApiKeyDetails(SecuritySchemeBuilder sec)
        {
            if (sec == null) return;
            var built = sec.Build();
            _templateParams["%(ApiKeyLocation)"] = built.@in;
            _templateParams["%(ApiKeyName)"] = built.name;

            if (string.IsNullOrWhiteSpace(_templateParams["%(ApiKeyName)"]))
            {
                _templateParams["%(ApiKeyName)"] = "none";
            }
        }