Esempio n. 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>)));
        }
Esempio n. 2
0
        private static Operation Map(IDictionary <string, object> operation)
        {
            if (operation == null)
            {
                return(null);
            }

            return(new Operation(operation["method"] as string, operation["name"] as string, operation["description"] as string,
                                 operation["deprecated"] == null ? false : Convert.ToBoolean(operation["deprecated"]), operation["summary"] as string,
                                 DocumentationMapper.Map(operation["documentation"] as IDictionary <string, object>),
                                 StringEnumerationMapper.Map(operation["schemes"] as object[]), StringEnumerationMapper.Map(operation["accepts"] as object[]),
                                 StringEnumerationMapper.Map(operation["contentType"] as object[]), RequestMapper.Map(operation["request"] as IDictionary <string, object>),
                                 ResponseMapper.Map(operation["responses"] as object[]), SecuritySchemeMapper.Map(operation["security"] as object[])));
        }