예제 #1
0
        private static ParametrizedSecurityScheme Map(IDictionary <string, object> security)
        {
            if (security == null)
            {
                return(null);
            }

            return(new ParametrizedSecurityScheme(security["name"] as string,
                                                  SecuritySchemeMapper.Map(security["securityScheme"] as IDictionary <string, object>),
                                                  SettingsMapper.Map(security["settings"] as IDictionary <string, object>)));
        }
예제 #2
0
        internal static SecurityScheme Map(IDictionary <string, object> security)
        {
            if (security == null)
            {
                return(null);
            }

            return(new SecurityScheme(security["name"] as string, security["type"] as string, security["displayName"] as string,
                                      security["description"] as string, ParameterMapper.Map(security["headers"] as object[]),
                                      ParameterMapper.Map(security["queryParameters"] as object[]),
                                      ResponseMapper.Map(security["responses"] as object[]), SettingsMapper.Map(security["settings"] as IDictionary <string, object>),
                                      ShapeMapper.Map(security["queryString"] as IDictionary <string, object>)));
        }