Пример #1
0
 private void SerializeScalar(StringBuilder sb, RamlType ramlType, int indentation)
 {
     RamlSerializerHelper.SerializeCommonParameterProperties(sb, ramlType.Scalar, indentation);
     RamlSerializerHelper.SerializeProperty(sb, "multipleOf", ramlType.Scalar.MultipleOf, indentation);
     RamlSerializerHelper.SerializeListProperty(sb, "fileTypes", ramlType.Scalar.FileTypes, indentation);
     SerializeFormat(sb, indentation, ramlType.Scalar.Format);
     SerializeAnnotations(sb, ramlType.Scalar.Annotations, indentation);
 }
Пример #2
0
        private void SerializeSecuritySettings(StringBuilder sb, SecuritySettings settings, int indent)
        {
            if (settings == null)
            {
                return;
            }

            sb.AppendLine("settings:".Indent(indent));
            RamlSerializerHelper.SerializeProperty(sb, "accessTokenUri", settings.AccessTokenUri, indent + 2);
            RamlSerializerHelper.SerializeProperty(sb, "authorizationUri", settings.AuthorizationUri, indent + 2);
            RamlSerializerHelper.SerializeProperty(sb, "requestTokenUri", settings.RequestTokenUri, indent + 2);
            RamlSerializerHelper.SerializeProperty(sb, "tokenCredentialsUri", settings.TokenCredentialsUri, indent + 2);
            SerializeArrayProperty(sb, "authorizationGrants", settings.AuthorizationGrants, indent + 2);
            RamlSerializerHelper.SerializeListProperty(sb, "scopes", settings.Scopes, indent + 2);
        }